Skip to content

Commit

Permalink
resolve violations
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Mar 4, 2025
1 parent 9ac2216 commit a39b98b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Library/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
plugins:
- rubocop-md:
plugin_class_name: RuboCop::Markdown::Plugin
- rubocop-rspec:
plugin_class_name: RuboCop::RSpec::Plugin

require:
- ./Homebrew/rubocops.rb
- rubocop-md
- rubocop-performance
- rubocop-rspec
- rubocop-sorbet
Expand Down
24 changes: 24 additions & 0 deletions docs/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ FormulaAudit/Desc:
FormulaAudit/Homepage:
Enabled: false

# This has false positives due to combining multiple code blocks.
Layout/EmptyLineBetweenDefs:
Enabled: false

Layout/LineLength:
Exclude:
- "**/Bottles.md" # The bottle block line length is long in its full form.
Expand All @@ -25,6 +29,26 @@ Layout/LineLength:
Lint/ConstantDefinitionInBlock:
Enabled: false

# These use the same dummy formula name for multiple examples.
Lint/DuplicateMethods:
Exclude:
- "**/Python-for-Formula-Authors.md"
- "**/Reproducible-Builds.md"

Lint/Void:
Exclude:
- "**/Formula-Cookbook.md" # void context is used to show args in examples

# Pre-existing violations, not worth breaking links
Naming/FileName:
Exclude:
- "**/Gems,-Eggs-and-Perl-Modules.md"
- "**/Tips-N'-Tricks.md"

# Documentation is often provided by the surrounding context.
Style/Documentation:
Enabled: false

# A fake regexp is deliberately documented for `inreplace` in the Formula Cookbook.
Style/RedundantRegexpArgument:
Enabled: false
Expand Down
6 changes: 3 additions & 3 deletions docs/Formula-Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -1058,17 +1058,17 @@ end
2. If the formula does not provide a service file you can generate one using the following stanza:

```ruby
# 1. An individual command
# 1. An individual command
service do
run opt_bin/"script"
end

# 2. A command with arguments
# 2. A command with arguments
service do
run [opt_bin/"script", "--config", etc/"dir/config.yml"]
end

# 3. OS specific commands (If you omit one, the service file won't get generated for that OS.)
# 3. OS specific commands (If you omit one, the service file won't get generated for that OS.)
service do
run macos: [opt_bin/"macos_script", "standalone"],
linux: var/"special_linux_script"
Expand Down

0 comments on commit a39b98b

Please sign in to comment.