-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Issue #16857: api: add new int process(List<Path> files)
method to RootModule - add api
#16872
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
Issue #16857: api: add new int process(List<Path> files)
method to RootModule - add api
#16872
Conversation
int process(List<Path> files)
method to RootModule
dbd29bb
to
47510ec
Compare
src/main/java/com/puppycrawl/tools/checkstyle/api/RootModule.java
Outdated
Show resolved
Hide resolved
* @see #destroy() | ||
*/ | ||
int process(Collection<Path> files) throws CheckstyleException; | ||
|
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.
47510ec
to
fbc80b6
Compare
int process(List<Path> files)
method to RootModuleint process(List<Path> files)
method to RootModule
…hod to RootModule
fbc80b6
to
342ddb9
Compare
…hod to RootModule
342ddb9
to
8d9f2f8
Compare
…hod to RootModule
8d9f2f8
to
2aaf914
Compare
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule - migrate old
…hod to RootModule
…hod to RootModule
…hod to RootModule
…hod to RootModule - prep checker
int process(List<Path> files)
method to RootModuleint process(List<Path> files)
method to RootModule - add api
2f3bf40
to
3134505
Compare
422d809
to
5c001a7
Compare
CI happy |
bb95a35
to
c7631bd
Compare
@@ -490,9 +490,11 @@ protected final void verify(Checker checker, | |||
throws Exception { | |||
stream.flush(); | |||
stream.reset(); | |||
final List<File> theFiles = new ArrayList<>(); | |||
Collections.addAll(theFiles, processedFiles); |
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.
theFiles
is kind of strange name anyway, as the
just like my
is not a good prefix for a field as its pretty generic and therefore adding fluff. its just the files
and not need to couple this. just give the value.
Simple List.of(
usage should be applied anyway, so lets just elevate this as we already on it.
List<File> files = List.of(processedFiles);
60fbecc
to
7ad51bb
Compare
should we split it this way and continue with the tests next, or you want to increase scope of this PR? |
@nrmancuso is this done the right way? Maybe we merge this and continue with tests: #16872 (comment) |
There is no deprecation marker on File class https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/io/File.html |
yes, but then we don´t need any further adjustment, not migrating whole application on new method. Only one method and a test for mapping and calling old method, thats it. |
7ad51bb
to
f5895a3
Compare
removed deprecation |
18b2218
to
5bff9bd
Compare
…thod to RootModule - add api
5bff9bd
to
9884cc3
Compare
@nrmancuso kindly request your critics on this, ty. |
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.
Items
@Override | ||
public int process(Collection<Path> files) throws CheckstyleException { | ||
return process(files.stream() | ||
.map(Path::toFile) |
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.
As we driving to better/modern class usage, we should use Path as primary, and old method that use File so convert to File. Right?
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.
yes, we can do everything in dedicated request.
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.
please do in this PR.
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.
if we think that PR becomes too big, we can do update of all inernals (non API classes) to Path
in first PR.
and in separate add new api method with proper strategy on how to migrate dependent code/projects.
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.
have done already its huge. Why no split? This is not good style.
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.
- Issue #16857: api: add new
int process(List<Path> files)
method to RootModule -remove api
#16978 - Issue #16857: api: add new
int process(List<Path> files)
method to RootModule -remove usage
#16977 - Issue #16857: api: add new
int process(List<Path> files)
method to RootModule -adapt tests
#16968
need to follow patterns always not sometime. give dedication following SPOT, SOC, like seen in
same here. Lets add non breaking API to give support. then move to next increment. |
Issue #16857: api: add new
int process(List<Path> files)
method to RootModule -add api
int process(List<Path> files)
method to RootModule -adapt tests
#16968