-
Notifications
You must be signed in to change notification settings - Fork 1
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
35 audit one liners [pr] #36
Conversation
I might suggest logging this and the following error at the WARN or INFO level as this appears to default to a value when the input is not correct.
An alternative syntax for map get is ids[key]. See https://groovy-lang.org/style-guide.html#_native_syntax_for_data_structures https://stackoverflow.com/questions/14196454/groovy-safely-find-a-key-in-a-map-and-return-its-value
Typically, the fields and constructor would appear at the top of the class. These should also be camelCase. For reference: https://stackoverflow.com/a/12427127
A common naming convention for constants like this string would be upper snake case like INSTALL_PREFIX https://google.github.io/styleguide/javaguide.html#s5.2.4-constant-names
> Should this be logged at the ERROR level? Not really. We can use this same codepath when creating a new package.
The safe navigation operator seems unnecessary here due to the preceding !query check.
I think this would be more readable to pass the closure directly
.warning -> .warn
QuiltObserverFactory.groovy: 37: [Static type checking] - Incompatible generic argument types. Cannot assign java.util.List <nextflow.quilt.QuiltObserver> to: java.util.Collection <TraceObserver> @ line 37, column 9. [new QuiltObserver()]
The Groovy safe navigation operator is a nice way to express this:
Groovy also has an exclusive range operator: beginIndex..<endIndex.
You should be able to omit the package name here:
to Groovy truthiness, empty string and null are both false
@unroll is not needed here.
@unroll is not needed here.
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.
✅ This pull request was sent to the PullRequest network because the title contains "[pr]".
Check the status or cancel PullRequest code review here.
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.
PullRequest Breakdown
Reviewable lines of change
+ 32
- 48
96% Groovy
4% Groovy (tests)
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
NOTE: The 'Type of change' is slightly misleading. These changes are purely stylistic, and should not have any functional impact. |
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.
I've gone through the attached audit and the list of fixes provided and confirmed that the list in the PR descriptions have been resolved. I left one clarifying comment about PRComment_033, but it is non blocking.
Reviewed with ❤️ by PullRequest
plugins/nf-quilt/src/main/nextflow/quilt/nio/QuiltFileSystem.groovy
Outdated
Show resolved
Hide resolved
PRComment_033, but it is non blocking.
First steps for #34
Identifier are from PullRequest.com report
https://github.com/quiltdata/nf-quilt/files/10470527/reportgen.zip
PRComment_002
PRComment_005
PRComment_009
PRComment_010a
PRComment_012
PRComment_015a
PRComment_016
PRComment_017
PRComment_018 [upper snake case]
PRComment_021a
PRComment_027
PRComment_030
PRComment_031
PRComment_032
PRComment_033
PRComment_036
PRComment_038
PRComment_040