rubocop: Only enable Style/Documentation for @api public code

- Suggested in https://github.com/Homebrew/brew/pull/14709#issuecomment-1437461642.
- Found the public API paths with `git grep -l "@api public"`.
This commit is contained in:
Issy Long 2023-02-26 13:20:08 +00:00
parent 6db7732fa3
commit 32e7268596
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
2 changed files with 40 additions and 28 deletions

View File

@ -339,13 +339,47 @@ Style/DisableCopsWithinSourceCodeDirective:
- "/**/{Formula,Casks}/*.rb"
- "**/{Formula,Casks}/*.rb"
# Don't enforce documentation in casks or formulae.
# Only enforce documentation for public APIs.
Style/Documentation:
Exclude:
- "Taps/**/*"
- "/**/{Formula,Casks}/*.rb"
- "**/{Formula,Casks}/*.rb"
- "**/*.rbi"
AllowedConstants:
- Homebrew
Include:
- Homebrew/cask/dsl.rb
- Homebrew/cask/dsl/version.rb
- Homebrew/cask/url.rb
- Homebrew/download_strategy.rb
- Homebrew/formula.rb
- Homebrew/formula_assertions.rb
- Homebrew/formula_free_port.rb
- Homebrew/language/go.rb
- Homebrew/language/java.rb
- Homebrew/language/node.rb
- Homebrew/language/perl.rb
- Homebrew/language/python.rb
- Homebrew/livecheck/strategy/apache.rb
- Homebrew/livecheck/strategy/bitbucket.rb
- Homebrew/livecheck/strategy/cpan.rb
- Homebrew/livecheck/strategy/extract_plist.rb
- Homebrew/livecheck/strategy/git.rb
- Homebrew/livecheck/strategy/github_latest.rb
- Homebrew/livecheck/strategy/gnome.rb
- Homebrew/livecheck/strategy/gnu.rb
- Homebrew/livecheck/strategy/hackage.rb
- Homebrew/livecheck/strategy/json.rb
- Homebrew/livecheck/strategy/launchpad.rb
- Homebrew/livecheck/strategy/npm.rb
- Homebrew/livecheck/strategy/page_match.rb
- Homebrew/livecheck/strategy/pypi.rb
- Homebrew/livecheck/strategy/sourceforge.rb
- Homebrew/livecheck/strategy/sparkle.rb
- Homebrew/livecheck/strategy/xorg.rb
- Homebrew/os.rb
- Homebrew/resource.rb
- Homebrew/utils.rb
- Homebrew/utils/inreplace.rb
- Homebrew/utils/shebang.rb
- Homebrew/utils/string_inreplace_extension.rb
- Homebrew/version.rb
Style/DocumentationMethod:
Include:

View File

@ -17,28 +17,6 @@ Naming/PredicateName:
- is_32_bit?
- is_64_bit?
Style/Documentation:
AllowedConstants:
- Homebrew
Exclude:
- "extend/**/*.rb"
- "test/**/*.rb"
- "cask/macos.rb"
- "cli/args.rb"
- "cli/parser.rb"
- "cmd/list.rb"
- "cmd/update-report.rb"
- "dev-cmd/irb.rb"
- "dev-cmd/pr-pull.rb"
- "keg_relocate.rb"
- "os/mac/keg.rb"
- "software_spec.rb"
- "utils.rb"
- "utils/fork.rb"
- "utils/git_repository.rb"
- "utils/popen.rb"
- "utils/shell.rb"
Style/HashAsLastArrayItem:
Exclude:
- "test/utils/spdx_spec.rb"