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

35 audit one liners [pr] #36

Merged
merged 21 commits into from
Jan 23, 2023
Merged

35 audit one liners [pr] #36

merged 21 commits into from
Jan 23, 2023

Conversation

drernie
Copy link
Member

@drernie drernie commented Jan 20, 2023

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

@drernie drernie linked an issue Jan 20, 2023 that may be closed by this pull request
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.
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
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.
@drernie drernie changed the title 35 audit one liners 35 audit one liners [pr] Jan 21, 2023
Copy link

@pullrequest pullrequest bot left a 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.

Copy link

@pullrequest pullrequest bot left a 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.

@drernie
Copy link
Member Author

drernie commented Jan 23, 2023

NOTE: The 'Type of change' is slightly misleading. These changes are purely stylistic, and should not have any functional impact.

Copy link

@pullrequest pullrequest bot left a 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.

Image of Tyler O Tyler O


Reviewed with ❤️ by PullRequest

PRComment_033, but it is non blocking.
@drernie drernie merged commit f22de03 into main Jan 23, 2023
@drernie drernie deleted the 35-audit-one-liners branch January 30, 2023 22:48
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.

audit-one-liners
1 participant