-
-
Notifications
You must be signed in to change notification settings - Fork 720
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds `pre-commit` to facilitate and unify the formatting of everything in this project (code, test, docs, ci). Aside from `.pre-commit-config.yml` and `docs/.markdownlint.yaml`, all the other changes are purely cosmetic, applying markdownlint and fixing here and there to make it pass. It also creates a new CI job that'll simply execute `pre-commit` for new PRs.
- Loading branch information
Showing
94 changed files
with
1,369 additions
and
1,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
## Contributing to GEF ## | ||
## Contributing to GEF | ||
|
||
### License ### | ||
## License | ||
|
||
`gef` is placed under [MIT license](https://github.com/hugsy/gef/blob/main/LICENSE) which provides Open-Source access to the code and its use. | ||
`gef` is placed under [MIT license](https://github.com/hugsy/gef/blob/main/LICENSE) which provides | ||
Open-Source access to the code and its use. | ||
|
||
By contributing to `gef` code through the _Pull Requests_ mechanism, you accept to release the code written by you under the said license. | ||
By contributing to `gef` code through the _Pull Requests_ mechanism, you accept to release the code | ||
written by you under the said license. | ||
|
||
## Submitting a Patch | ||
|
||
### Submitting a Patch ### | ||
|
||
1. Fork `gef` repository (requires GitHub account). Sending a patch from the | ||
1. Fork `gef` repository (requires GitHub account). Sending a patch from the | ||
`patch` or `git diff --patch` commands is not accepted. | ||
1. Write the changes in your local repo. | ||
* Respect the coding style (same indentation format, explicit names as possible) | ||
* Comment your code | ||
* If you add a new feature/GDB command, also write the adequate | ||
documentation (in [`docs/`](docs/)) | ||
1. Submit a pull request, make sure it is made against the `main` branch | ||
1. The contributors will review your patch. If it is approved, the change will | ||
1. All the packages required for testing and documenting are listed in `tests/requirements.txt` | ||
1. Adjust your development environment to GEF's: this is achieved using | ||
[`pre-commit`](https://pre-commit.com/), and getting setup is simply done by | ||
1. Installing `pre-commit` PIP package (part of the `requirements.txt` file) | ||
1. Setup `pre-commit` : `pre-commit install` | ||
1. Write the changes in your local repo making sure to respect the coding style (same indentation | ||
format, explicit names as possible), comment your code sufficiently so it becomes maintainable by | ||
someone other than you. Finally if you add a new feature/GDB command, also write the adequate | ||
documentation (in [`docs/`](docs/)) | ||
1. Submit a pull request | ||
1. The contributors will review your patch. If it is approved, the change will | ||
be merged via the GitHub, and you will be seen as contributors. If it needs | ||
additional work, the repo owner will respond with useful comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [hugsy,] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,20 @@ | ||
|
||
## Description/Motivation/Screenshots | ||
## Description | ||
|
||
<!-- Describe technically what your patch does. --> | ||
<!-- Why is this change required? What problem does it solve? --> | ||
<!-- Why is this patch will make a better world? --> | ||
<!-- How does this look? Add a screenshot if you can --> | ||
|
||
<!-- Why is this change required? What problem does it solve? --> | ||
|
||
## Against which architecture was this tested ? | ||
|
||
"Tested" indicates that the PR works *and* the unit test (see `docs/testing.md`) run passes without issue. | ||
<!-- Why is this patch will make a better world? --> | ||
|
||
* [ ] x86-32 | ||
* [ ] x86-64 | ||
* [ ] ARM | ||
* [ ] AARCH64 | ||
* [ ] MIPS | ||
* [ ] POWERPC | ||
* [ ] SPARC | ||
* [ ] RISC-V | ||
<!-- How does this look? Add a screenshot if you can --> | ||
|
||
<!-- Annotate your PR with label proper labels (architecture impacted, type of improvement, etc.) | ||
## Checklist | ||
<!-- N.B.: Your patch won't be reviewed unless fulfilling the following base requirements: --> | ||
<!--- Put an `x` in all the boxes that are complete, or that don't apply --> | ||
- [ ] My code follows the code style of this project. | ||
- [ ] My change includes a change to the documentation, if required. | ||
- [ ] If my change adds new code, [adequate tests](docs/testing.md) have been added. | ||
- [ ] I have read and agree to the **CONTRIBUTING** document. | ||
- [ ] My code follows the code style of this project. | ||
- [ ] My change includes a change to the documentation, if required. | ||
- [ ] If my change adds new code, [adequate tests](docs/testing.md) have been added. | ||
- [ ] I have read and agree to the **CONTRIBUTING** document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Validation | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pre_commit: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] | ||
|
||
docs_link_check: | ||
name: Check URLs in docs | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: Check links | ||
uses: lycheeverse/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
args: --exclude-mail --accept=401 --no-progress 'docs/**/*.md' | ||
fail: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
default_stages: [pre-commit, pre-push] | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/pylint | ||
rev: v3.0.0a6 | ||
hooks: | ||
- id: pylint | ||
|
||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.35.0 | ||
hooks: | ||
- id: markdownlint-docker | ||
args: | ||
- --config=docs/.markdownlint.yaml | ||
- --ignore=docs/api/gef.md | ||
- --ignore=docs/obsolete/docs/index.md | ||
- --ignore=docs/index.md | ||
- --ignore=README.md | ||
- "docs/**/*.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.