-
Notifications
You must be signed in to change notification settings - Fork 39
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
Gradle plugin: use PatternSet
instead of FileCollection
for inputs
#1118
Conversation
### What's done: * Changed logic * Changed examples * Changed tests
### What's done: * Refactor build_and_test.yml
32a1d5c
to
67fec1b
Compare
### What's done: * Fix functional test
67fec1b
to
5bb7885
Compare
### What's done: * Fix functional test
Codecov Report
@@ Coverage Diff @@
## master #1118 +/- ##
============================================
- Coverage 83.43% 83.42% -0.01%
+ Complexity 2483 2479 -4
============================================
Files 102 102
Lines 6241 6250 +9
Branches 1867 1868 +1
============================================
+ Hits 5207 5214 +7
- Misses 275 276 +1
- Partials 759 760 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
### What's done: * Fix functional test
### What's done: * Remove `useIR`, because for kotlin 1.5.x it does nothing and IR is used anyway
with(diktatExtension) { | ||
// validate configuration | ||
require(inputs == null && excludes == null) { | ||
"`inputs` and `excludes` for diktat should be changed for inputs(Action)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"inputs
and excludes
arguments for diktat task are deprecated and now should be changed for inputs(Action). Please check the Readme.md for more info"
### What's done: * Fix description * Fix codecov link in README.md
@@ -110,7 +117,7 @@ jobs: | |||
runs-on: ${{ matrix.os }} | |||
strategy: | |||
matrix: | |||
os: [ ubuntu-latest, windows-latest, macos-latest ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a duplicated execution on ubuntu: main job (build and test and upload codecov
) is basically the same, but also with codecov. So there is no need for a separate build_and_test on ubuntu
Have you found out why tests did not catch this? |
The logic itself was actually correct - we were running ktlint with expected patterns. However, they must've broken something with pattern matching on windows. In our tests we were comparing command line (where patterns were correct), and in functional tests we are excluding files by specific names instead of wildcards only. Edit: we had a test with wildcard based excludes. I think, include didn't work properly on Windows, so no files were checked. @akuleshov7 , I've added a new source file into examples, so that now in tests for excludes there is one included and one excluded file. |
What's done:
NO_SOURCE
statuses wen provided patterns don't match anything)diktat-gradle-plugin/build.gradle.kts
This PR proposes a more convenient API for configuring inputs for gradle task. See #1026 , #1094