Skip to content

Commit

Permalink
Merge branch 'main' into dev/charlie/remove_newline
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-rivos authored Feb 4, 2025
2 parents 98401a1 + e8466e8 commit b779999
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 22 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@ Contributors
- Skyler Grey <sky@a.starrysky.fyi>
- Emil Velikov <emil.l.velikov@gmail.com>
- Linnea Gräf <nea@nea.moe>
- Raphael Schlarb <info@raphael.schlarb.one>
- Charlie Jenkins <charlie@rivosinc.com>
67 changes: 45 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,52 @@ may be closed for various reasons, such as:
To be safe, open an issue and engage in dialogue before beginning to implement a
feature that may not be accepted.

When making a pull request, don't hesitate to add yourself to the AUTHORS.rst
file and the copyright headers of the files you touch.
**Pull requests need not be perfect.** Not all the tests need to pass. A pull
request with 80% of the work done is a lot better than no pull request at all.
We can work together on making the pull request merge-ready, or the maintainers
can finalise the pull request for you.

### Change log
Making a pull request generally necessitates the following steps:

### Set up local development

Starting local development is very simple, just execute the following commands:

```bash
git clone git@github.com:fsfe/reuse-tool.git
cd reuse-tool/
poetry install # You may need to install poetry using your package manager.
poetry run pre-commit install # Using poetry is optional here if you already have pre-commit.
```

Next, you'll find the following commands handy:

- `poetry run reuse`
- `poetry run pytest`
- `poetry run pylint src`
- `poetry run mypy`
- `make docs`

### Make changes

This is the tricky bit for which no development guide exists. You make changes
somewhere in the code. If you can, do the following things:

- Write docstrings.
- Add type hinting.
- Write tests.
- Update documentation.
- Add self as author to every touched file.
- Add self to `AUTHORS.rst`.

### Commit and submit a pull request

As part of committing, `pre-commit` should run some checks. If you can easily
fix them, fix them. If you get stuck here, **do not worry**. Just skip the
pre-commit step with `git commit -n`, and make a pull request. The maintainers
will be happy to fix those annoying things.

### Make a change log entry

Every pull request should add a change log entry. Change log entries go into
`changelog.d/<directory>/<name>.md`, where `<directory>` is the appropriate
Expand Down Expand Up @@ -78,25 +120,6 @@ Broader instructions on how to help the FSFE translate things into local
languages can be found at <https://fsfe.org/contribute/translators/>. The
translators keep in touch with the <translators@lists.fsfe.org> mailing list.

## Local development

Starting local development is very simple, just execute the following commands:

```bash
git clone git@github.com:fsfe/reuse-tool.git
cd reuse-tool/
poetry install # You may need to install poetry using your package manager.
poetry run pre-commit install # Using poetry is optional here if you already have pre-commit.
```

Next, you'll find the following commands handy:

- `poetry run reuse`
- `poetry run pytest`
- `poetry run pylint src`
- `poetry run mypy`
- `make docs`

## Development conventions

### Poetry
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/added/comment-gperf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added `.gperf` (CppCommentStyle) as a recognised file type for comments.
(#1131)
2 changes: 2 additions & 0 deletions src/reuse/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# SPDX-FileCopyrightText: 2023 Shun Sakai <sorairolake@protonmail.ch>
# SPDX-FileCopyrightText: 2024 Rivos Inc.
# SPDX-FileCopyrightText: 2024 Anthony Loiseau <anthony.loiseau@allcircuits.com>
# SPDX-FileCopyrightText: 2025 Raphael Schlarb <info@raphael.schlarb.one>
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -654,6 +655,7 @@ class XQueryCommentStyle(CommentStyle):
".ftl": FtlCommentStyle,
".gemspec": PythonCommentStyle,
".go": CppCommentStyle,
".gperf": CppCommentStyle,
".gradle": CppCommentStyle,
".graphql": PythonCommentStyle,
".graphqls": PythonCommentStyle,
Expand Down

0 comments on commit b779999

Please sign in to comment.