Skip to content

Commit

Permalink
Add support for arcanist config file extensions
Browse files Browse the repository at this point in the history
Those are used by (Phabricator/Phorge)'s arcanist CLI tools.

- `.arcconfig`: [docs](https://we.phorge.it/book/phorge/article/arcanist_new_project/)
- `.arclint` and `.arcunit`: [docs](https://we.phorge.it/book/phorge/article/arcanist_lint_unit/)
  says "inside `.arcconfig`" but apparently (according to upstream repo) `.arclint`
  and `.arcunit` is supported as well.

Signed-off-by: Yongmin Hong <[email protected]>
  • Loading branch information
revi committed Dec 30, 2024
1 parent a7896a5 commit e09332e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ Contributors
- Skyler Grey <[email protected]>
- Emil Velikov <[email protected]>
- Linnea Gräf <[email protected]>
- Yongmin Hong <[email protected]>
2 changes: 2 additions & 0 deletions changelog.d/added/added-arcanist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added `.arcconfig`, `.arclint`, `.arcunit` (all uncommentable) as recognized
file types for comments. (#1123)
4 changes: 4 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 <[email protected]>
# SPDX-FileCopyrightText: 2024 Rivos Inc.
# SPDX-FileCopyrightText: 2024 Anthony Loiseau <[email protected]>
# SPDX-FileCopyrightText: 2024 Yongmin Hong <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -838,6 +839,9 @@ class XQueryCommentStyle(CommentStyle):
}

FILENAME_COMMENT_STYLE_MAP = {
".arcconfig": UncommentableCommentStyle, # is a JSON file
".arclint": UncommentableCommentStyle, # is a JSON file
".arcunit": UncommentableCommentStyle, # is a JSON file
".bashrc": PythonCommentStyle,
".bazelignore": PythonCommentStyle,
".bazelrc": PythonCommentStyle,
Expand Down

0 comments on commit e09332e

Please sign in to comment.