Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require configuration for every rule in yml file #520

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Nov 13, 2020

What's done:

  • Provided default value
  • Edited all config files

This pull request closes #468

The issue stated that disabled rules don't need configuration, but all configuration options have default values and it will work.

### What's done:
* Provided default value
* Edited all config files
@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #520 (5d11c20) into master (1e019c0) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #520      +/-   ##
============================================
- Coverage     81.81%   81.79%   -0.03%     
  Complexity     1596     1596              
============================================
  Files            76       76              
  Lines          4026     4026              
  Branches       1277     1278       +1     
============================================
- Hits           3294     3293       -1     
- Misses          214      215       +1     
  Partials        518      518              
Flag Coverage Δ Complexity Δ
unittests 81.79% <0.00%> (-0.03%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...fn/diktat/common/config/rules/RulesConfigReader.kt 31.03% <0.00%> (-3.45%) 4.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e019c0...cc53d47. Read the comment docs.

@petertrr petertrr marked this pull request as ready for review November 13, 2020 12:59
@petertrr petertrr marked this pull request as draft November 13, 2020 13:05
@petertrr petertrr marked this pull request as ready for review November 13, 2020 13:06
Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

- name: EXCEPTION_SUFFIX
enabled: true
configuration: {}
configuration: { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a yml file for tests, so I've kept different versions for configuration, which should be valid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, ok

@petertrr petertrr merged commit c8c3322 into master Nov 16, 2020
@petertrr petertrr deleted the feature/config-file#468 branch November 16, 2020 08:11
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.

If the rule is disabled we should be able not to put extra configuration for it
2 participants