-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from DigitalNZ/rm/codeclimate-diff
Add code quality score
- Loading branch information
Showing
10 changed files
with
492 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
version: "2" | ||
plugins: | ||
rubocop: | ||
enabled: true | ||
channel: rubocop-1-36-0 | ||
reek: | ||
enabled: true | ||
|
||
exclude_patterns: | ||
- config/ | ||
- db/ | ||
- dist/ | ||
- features/ | ||
- public/ | ||
- "**/node_modules/" | ||
- script/ | ||
- "**/spec/" | ||
- "**/test/" | ||
- "**/tests/" | ||
- Tests/ | ||
- "**/vendor/" | ||
- "**/*_test.go" | ||
- "**/*.d.ts" | ||
- "**/*.min.js" | ||
- "**/*.min.css" | ||
- "**/__tests__/" | ||
- "**/__mocks__/" | ||
- "/.gitlab/" | ||
- coverage/ . # simple cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main_branch_name: main # defaults to main | ||
threshold_to_run_on_all_files: 8 # when you reach a certain number of files changed, it becomes faster to analyze all files rather than analyze them one by one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Code quality score | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
code_quality_score: | ||
name: Code quality | ||
uses: DigitalNZ/code_quality_score/.github/workflows/calculate-code-quality-score.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
detectors: | ||
IrresponsibleModule: | ||
enabled: false | ||
|
||
NilCheck: | ||
enabled: false | ||
|
||
ManualDispatch: | ||
enabled: false | ||
|
||
LongParameterList: | ||
max_params: 4 # defaults to 3. You want this number realistic but stretchy so we can move it down | ||
|
||
TooManyStatements: | ||
max_statements: 10 # defaults to 5. You want this number realistic but stretchy so we can move it down | ||
|
||
UtilityFunction: | ||
public_methods_only: true | ||
|
||
UncommunicativeVariableName: | ||
accept: | ||
- e | ||
|
||
directories: | ||
"app/controllers": | ||
IrresponsibleModule: | ||
enabled: false | ||
NestedIterators: | ||
max_allowed_nesting: 2 | ||
UnusedPrivateMethod: | ||
enabled: false | ||
InstanceVariableAssumption: | ||
enabled: false | ||
"app/helpers": | ||
IrresponsibleModule: | ||
enabled: false | ||
UtilityFunction: | ||
enabled: false | ||
FeatureEnvy: | ||
enabled: false | ||
"app/mailers": | ||
InstanceVariableAssumption: | ||
enabled: false | ||
"app/models": | ||
InstanceVariableAssumption: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.