Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7dc33207
Commit
7dc33207
authored
Oct 21, 2021
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention `.rubocop_todo/**/*.yml` in Contribution Style Guide
parent
1e166119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
doc/development/contributing/style_guides.md
doc/development/contributing/style_guides.md
+9
-6
No files found.
doc/development/contributing/style_guides.md
View file @
7dc33207
...
...
@@ -171,7 +171,10 @@ we should track our progress through the exception list.
When auto-generating the
`.rubocop_todo.yml`
exception list for a particular Cop,
and more than 15 files are affected, we should add the exception list to
a different file,
`.rubocop_manual_todo.yml`
.
a different file within
`.rubocop_todo/`
directory.
For example, the configuration for the cop
`Gitlab/NamespacedClass`
is located
in
`.rubocop_todo/gitlab/namespaced_class.yml`
.
This ensures that our list isn't mistakenly removed by another auto generation of
the
`.rubocop_todo.yml`
. This also allows us greater visibility into the exceptions
...
...
@@ -184,19 +187,19 @@ bundle exec rake rubocop:todo:generate
```
You can then move the list from the freshly generated
`.rubocop_todo.yml`
for the Cop being actively
resolved and place it in the
`.rubocop_manual_todo.yml`
. In this scenario, do not commit auto generated
changes to the
`.rubocop_todo.yml`
as an
`exclude limit`
that is higher than 15 will make the
`.rubocop_todo.yml`
hard to parse.
resolved and place it in the
directory
`.rubocop_todo/`
. In this scenario, do not commit
auto-generated changes to the
`.rubocop_todo.yml`
, as an
`exclude limit`
that is higher than 15
makes the
`.rubocop_todo.yml`
hard to parse.
### Reveal existing RuboCop exceptions
To reveal existing RuboCop exceptions in the code that have been excluded via
`.rubocop_todo.yml`
and
`.rubocop_
manual_todo
.yml`
, set the environment variable
`REVEAL_RUBOCOP_TODO`
to
`1`
.
`.rubocop_
todo/**/*
.yml`
, set the environment variable
`REVEAL_RUBOCOP_TODO`
to
`1`
.
This allows you to reveal existing RuboCop exceptions during your daily work cycle and fix them along the way.
NOTE:
Permanent
`Exclude`
s should be defined in
`.rubocop.yml`
instead of
`.rubocop_manual_todo
.yml`
.
Define permanent
`Exclude`
s in
`.rubocop.yml`
instead of
`.rubocop_todo/**/*
.yml`
.
## Database migrations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment