Files
news.gitea.happylizard.me/bin/gems/jekyll-4.4.1/rubocop/jekyll/no_p_allowed.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

23 lines
466 B
Ruby

# frozen_string_literal: true
module RuboCop
module Cop
module Jekyll
class NoPAllowed < Base
MSG = "Avoid using `p` to print things. Use `Jekyll.logger` instead."
RESTRICT_ON_SEND = %i[p].freeze
def_node_search :p_called?, <<-PATTERN
(send _ :p _)
PATTERN
def on_send(node)
if p_called?(node)
add_offense(node.loc.selector)
end
end
end
end
end
end