Skip to content

Conversation

@jay7x
Copy link
Contributor

@jay7x jay7x commented Feb 3, 2026

No description provided.

@jay7x
Copy link
Contributor Author

jay7x commented Feb 3, 2026

rubocop -A breaks things, so need to go with small steps

@jay7x
Copy link
Contributor Author

jay7x commented Feb 3, 2026

Style/FrozenStringLiteralComment breaks source/_plugins/toc.rb

Liquid Exception: can't modify frozen String: "" in [...]/source/_layouts/default.html

@jay7x
Copy link
Contributor Author

jay7x commented Feb 3, 2026

Style/StringConcatenation breaks rake references:<..>:

NoMethodError: undefined method `read' for "[...]/lib/puppet_references/puppettype_template.erb":String (NoMethodError)
TEMPLATE = ERB.new(TEMPLATE_FILE.read, trim_mode: '-')

Found the issue related: rubocop/rubocop#9144
In short words Pathname("foo") + "index.html" is not the same as "#{Pathname("foo")}index.html"

@jay7x jay7x marked this pull request as draft February 3, 2026 03:53
@jay7x
Copy link
Contributor Author

jay7x commented Feb 3, 2026

TODO:

  • Add references rake tasks for facter and puppet to CI
  • Add rubocop call to CI
  • Fix issues as much as possible

@jay7x
Copy link
Contributor Author

jay7x commented Feb 5, 2026

Switched Style/StringConcatenation cop to conservative mode to avoid Pathname replacements.

@jay7x
Copy link
Contributor Author

jay7x commented Feb 5, 2026

At this point it should be fine to squash all rubocop: fix ... commits

@jay7x
Copy link
Contributor Author

jay7x commented Feb 5, 2026

Yay! Just fixed issues with Style/FrozenStringLiteralComment!

@jay7x
Copy link
Contributor Author

jay7x commented Feb 5, 2026

No autocorrectable issues left except Style/ClassAndModuleChildren that breaks jekyll call (something about undefined logger.

jay7x and others added 5 commits February 11, 2026 11:25
* apply safe autocorrect
* fix Style/MutableConstant
* fix Style/NumericPredicate
* fix Style/AndOr
* fix Style/ZeroLengthPredicate
* fix Style/SymbolProc
* fix Style/SelectByRegexp
* fix Style/ClassEqualityComparison
* fix Style/GlobalStdStream
* fix Style/RedundantParentheses
* fix Security/JSONLoad
* fix Style/HashEachMethods
* fix Style/PreferredHashMethods
* fix Style/HashConversion
* fix Style/MapToHash
* fix Style/InverseMethods
* fix Style/SlicingWithRange
* fix Lint/NonAtomicFileOperation
* fix Performance/MapCompact
* fix Style/RedundantInterpolation
* fix Style/RedundantParentheses
* fix Lint/AmbiguousRange
* fix Lint/AssignmentInCondition
* fix Performance/DeletePrefix
* fix Performance/Detect
* fix Performance/StringInclude
* fix Style/CombinableLoops
* fix Layout/IndentationWidth
* fix Layout/IndentationConsistency
* fix Layout/CommentIndentation
* fix Style/CommentedKeyword
* fix Layout/CommentIndentation
* fix Style/HashTransformKeys
* fix Style/SymbolProc
* fix Style/HashTransformValues
* fix Style/MinMaxComparison
* fix Style/RaiseArgs
* fix Style/RedundantSort
* fix Style/SafeNavigation
* fix Style/SpecialGlobalVars
* fix Layout/BlockAlignment
* fix Layout/IndentationWidth
* fix Layout/IndentationConsistency
* fix Layout/CommentIndentation
* fix Style/IfUnlessModifier
* fix Style/StringConcatenation
* fix Style/FrozenStringLiteralComment
* fix/disable Lint/DuplicateBranch
* fix Performance/CollectionLiteralInLoop
* fix Style/OptionalBooleanParameter
* disable Style/MultilineBlockChain
* fix Style/ClassVars
* fix Style/ClassAndModuleChildren
* fix Naming/VariableNumber
* fix Naming/PredicateMethod
* fix Naming/PredicatePrefix
* fix Lint/SuppressedException
* fix Naming/HeredocDelimiterNaming
* fix Style/OpenStructUse
* fix Rake/MethodDefinitionInTask
* Ensure rake fails if `jekyll build` call fails (this is expected
  behavior in CI/CD).
* Fix SIGINT handling in the preview task.
@jay7x jay7x changed the title Add rubocop Enable rubocop and fix most of the issues Feb 11, 2026
@jay7x jay7x marked this pull request as ready for review February 11, 2026 03:31
@jay7x
Copy link
Contributor Author

jay7x commented Feb 11, 2026

I squashed most of fixes in just 2 batches. Should be good to merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants