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

Improve contribution documentation #572

Merged
merged 4 commits into from
Apr 13, 2023
Merged

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Apr 8, 2023

Suggested commit message:

Improve contribution documentation (#572)

- Introduce a `./run-full-build.sh` script.
- Explicitly mention that users should run this script before opening a pull
  request.
- Emphasize that many build warnings can be resolved automatically.
- Introduce a `SECURITY.md` file as suggested by GitHub.

Context of this PR: I've registered Error Prone Support with the OpenSSF Best Practices Badge Program, and these changes increase our compliance. (Other PRs to improve compliance may follow.)

@Stephan202 Stephan202 added this to the 0.10.0 milestone Apr 8, 2023
@Stephan202 Stephan202 requested review from japborst and rickie April 8, 2023 13:23
@github-actions
Copy link

github-actions bot commented Apr 8, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

will take such reports seriously and work with you to resolve the issue in a
timely manner.

[security-advisories]: https://github.com/PicnicSupermarket/error-prone-support/security/advisories
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not know this existed. Nice!

CONTRIBUTING.md Outdated
Comment on lines 51 to 52
- Make sure that the `mvn clean install` build fully passes, ideally before
opening a pull request. See the [development
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally? Or should we make this more mandatory

Suggested change
- Make sure that the `mvn clean install` build fully passes, ideally before
opening a pull request. See the [development
- Before opening a Pull Request, make sure that the `mvn clean install`
build fully passes. See the [development

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually thinking about this last night, and realized that if people get stuck, this requirement might discourage them from contributing at all. I proposed a new sentence; PTAL :)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@japborst
Copy link
Member

FYI there's a typo on https://bestpractices.coreinfrastructure.org/en/projects/7199. s/Errorc/Error

@Stephan202
Copy link
Member Author

🤦 Fixed!

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commit. PTAL :). Overall, LGTM!

SECURITY.md Outdated
timely manner.

[security-advisories]: https://github.com/PicnicSupermarket/error-prone-support/security/advisories
[semantic-versioning]: https://semver.org/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[semantic-versioning]: https://semver.org/
[semantic-versioning]: https://semver.org

SECURITY.md Outdated
## Reporting a vulnerability

To report a vulnerability, please visit the [security
advisories][security-advisories] page an click _Report a vulnerability_. We
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
advisories][security-advisories] page an click _Report a vulnerability_. We
advisories][security-advisories] page and click _Report a vulnerability_. We

CONTRIBUTING.md Outdated
That said, if you feel that the build fails for invalid or debatable reasons,
or if you're unsure how to best resolve an issue, don't let that discourage
you from opening a PR with a failing build; we can have a look at the issue
together.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at it, I would like to propose to add running the selfcheck here. PTAL.

@github-actions
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie
Copy link
Member

rickie commented Apr 11, 2023

Tweaked suggested commit message as well.

Copy link
Member Author

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can do better here, e.g. by checking in the build-all.sh script I use locally. But likely we should more generally refactor this information so that it's not spread across two files. That seems like a larger task, though...

CONTRIBUTING.md Outdated
Comment on lines 69 to 72
- Make sure that there are no violations of the newly introduced checks in the
codebase itself by running the [self check][error-prone-support-self-check].
See the [development instructions][error-prone-support-developing] for extra
context.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mostly repeats the text above. The idea behind referencing the error-prone-support-developing was that we don't need to repeat the self check description.

CONTRIBUTING.md Outdated
[error-prone-support-issues]: https://github.com/PicnicSupermarket/error-prone-support/issues
[error-prone-support-mutation-tests]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/run-mutation-tests.sh
[error-prone-support-pulls]: https://github.com/PicnicSupermarket/error-prone-support/pulls
[error-prone-support-self-check]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/apply-error-prone-suggestions.sh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the auto-fix script, not a full self check. (The details are subtle, which is why I was thinking to only reference the other section.)

@rickie
Copy link
Member

rickie commented Apr 11, 2023

I'm not sure everyone reads till the end in the error-prone-support-developing section as the explanation is below "some other commands one may find relevant". We could also reword that to say something along the lines of "important/helpful to run before opening a PR". That would highlight the actual importance IMO.

@rickie rickie added the documentation A documentation update label Apr 11, 2023
@Stephan202
Copy link
Member Author

K, I'll get back to this later for a more holistic approach, then.

@Stephan202
Copy link
Member Author

Added a commit in which I reshuffled and emphasized a few things. Also added a script to run the "full build".

@github-actions
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 good stuff! Really nice improvements :).

@rickie
Copy link
Member

rickie commented Apr 13, 2023

Will rebase and merge this.

Stephan202 and others added 4 commits April 13, 2023 08:32
- Explicitly mention that users should run `mvn clean install` before
  opening a pull request.
- Introduce a `SECURITY.md` file as suggested by GitHub.
@rickie rickie force-pushed the sschroevers/doc-improvements branch from 21dd324 to f00ad89 Compare April 13, 2023 06:32
@github-actions
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie
Copy link
Member

rickie commented Apr 13, 2023

Tweaked suggested commit message PTAL.

@Stephan202
Copy link
Member Author

Good one; made some changes :)

@rickie
Copy link
Member

rickie commented Apr 13, 2023

Okay I indeed should've done better here 😅. Thanks! Will merge.

@rickie
Copy link
Member

rickie commented Apr 13, 2023

(Dropped one tiny word, something that is introduced is always new right 😉, and the last entry doesn't have "new").

@rickie rickie merged commit 977019c into master Apr 13, 2023
@rickie rickie deleted the sschroevers/doc-improvements branch April 13, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A documentation update
Development

Successfully merging this pull request may close these issues.

3 participants