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

Support running diktat without configuration #1837

Merged
merged 12 commits into from
Nov 30, 2023

Conversation

nulls
Copy link
Member

@nulls nulls commented Nov 30, 2023

What's done:

  • moved all from 'diktat-common' to 'diktat-rules' and diktat-api
  • support empty configuration in plugins and cli

It closes #1833

### What's done:
- renamed 'diktat-common' to 'diktat-configuration'
- WIP

It closes #1833
Copy link
Contributor

github-actions bot commented Nov 30, 2023

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   6m 49s ⏱️ +5s
1 402 tests ±0  1 385 ✔️ ±0  17 💤 ±0  0 ±0 
2 781 runs  ±0  2 764 ✔️ ±0  17 💤 ±0  0 ±0 

Results for commit 6f02065. ± Comparison against base commit 137b4f7.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
com.saveourtool.diktat.test.ConfigReaderTest ‑ testing json reading()
com.saveourtool.diktat.test.ConfigReaderTest ‑ testing kotlin version()
com.saveourtool.diktat.ruleset.config.DiktatRuleConfigYamlReaderTest ‑ testing json reading()
com.saveourtool.diktat.ruleset.config.DiktatRuleConfigYamlReaderTest ‑ testing kotlin version()

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 30, 2023

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   5m 17s ⏱️ -58s
1 402 tests ±0  1 366 ✔️ ±0  36 💤 ±0  0 ±0 
2 781 runs  ±0  2 745 ✔️ ±0  36 💤 ±0  0 ±0 

Results for commit 6f02065. ± Comparison against base commit 137b4f7.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
com.saveourtool.diktat.test.ConfigReaderTest ‑ testing json reading()
com.saveourtool.diktat.test.ConfigReaderTest ‑ testing kotlin version()
com.saveourtool.diktat.ruleset.config.DiktatRuleConfigYamlReaderTest ‑ testing json reading()
com.saveourtool.diktat.ruleset.config.DiktatRuleConfigYamlReaderTest ‑ testing kotlin version()

♻️ This comment has been updated with latest results.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ktlint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (137b4f7) 78.18% compared to head (6f02065) 78.42%.

Files Patch % Lines
...rtool/diktat/ruleset/config/CommonConfiguration.kt 76.00% 2 Missing and 4 partials ⚠️
...t/ruleset/config/AbstractDiktatRuleConfigReader.kt 71.42% 3 Missing and 1 partial ⚠️
.../saveourtool/diktat/plugin/maven/DiktatBaseMojo.kt 0.00% 3 Missing ⚠️
...lin/com/saveourtool/diktat/cli/DiktatProperties.kt 0.00% 1 Missing ⚠️
...rtool/diktat/plugin/gradle/tasks/DiktatTaskBase.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1837      +/-   ##
============================================
+ Coverage     78.18%   78.42%   +0.24%     
- Complexity     2425     2434       +9     
============================================
  Files           131      133       +2     
  Lines          8631     8617      -14     
  Branches       2174     2171       -3     
============================================
+ Hits           6748     6758      +10     
+ Misses          917      897      -20     
+ Partials        966      962       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nulls nulls marked this pull request as ready for review November 30, 2023 11:25
@nulls nulls self-assigned this Nov 30, 2023
@nulls nulls requested a review from orchestr7 November 30, 2023 11:33
@nulls nulls merged commit abc481e into master Nov 30, 2023
20 of 21 checks passed
@nulls nulls deleted the feature/empty-configuration#1833 branch November 30, 2023 12:47
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.

Diktat 2.0 doesn't support configuration without configFile
2 participants