-
Notifications
You must be signed in to change notification settings - Fork 8
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
Introduce AddTeamToCodeowners Recipe #34
Conversation
393c6e8
to
7b652fc
Compare
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.
Looks good to me!
return new TreeVisitor<Tree, ExecutionContext>() { | ||
@Override | ||
public Tree visit(@Nullable Tree tree, ExecutionContext executionContext, Cursor parent) { | ||
SourceFile sourceFile = (SourceFile) requireNonNull(tree); |
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.
Not quite sure when tree would ever be null here; we can hope we don't find out. Did you see this pattern elsewhere?
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 believe so, though I don't recall where. I think it's mainly for telling the IDE to not highlight tree
since that's marked @Nullable
in the superclass.
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.
Found it in CreateTextFile
src/main/java/org/openrewrite/jenkins/github/AddTeamToCodeowners.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Tim te Beek <[email protected]>
What's changed?
A new recipe has been introduced.
What's your motivation?
Closes #19.
Anything in particular you'd like reviewers to focus on?
The style-matching implementation is done in-recipe, there may be a better way to do this.
Anyone you would like to review specifically?
@timtebeek @basil
Any additional context
Checklist
./gradlew licenseFormat