From 4ca8dadd95f9392323531207e51f0ddc6f77c194 Mon Sep 17 00:00:00 2001 From: Anthony Loiseau Date: Fri, 17 Nov 2023 17:27:23 +0100 Subject: [PATCH 1/2] comment: add few various file types and names New files extensions: - GNU linker scripts (*.ld) are commentable as a C file ("// ") - Assembler source code (*.s) is always commentable as a Lisp file ("; ") to my knowledge New file names: - .empty files may be created in git-like scm having no empty folder support. Given their name and emptiness, those files can be skipped. - .shellcheckrc configuration files are commentable like python files - the same for pylintrc files Signed-off-by: Anthony Loiseau --- src/reuse/comment.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/reuse/comment.py b/src/reuse/comment.py index 218d2305e..705237c7f 100644 --- a/src/reuse/comment.py +++ b/src/reuse/comment.py @@ -629,6 +629,7 @@ class XQueryCommentStyle(CommentStyle): ".kts": CCommentStyle, ".l": LispCommentStyle, ".latex": TexCommentStyle, + ".ld": CCommentStyle, ".less": CssCommentStyle, ".license": EmptyCommentStyle, ".lisp": LispCommentStyle, @@ -697,6 +698,7 @@ class XQueryCommentStyle(CommentStyle): ".rs": CCommentStyle, ".rss": HtmlCommentStyle, ".rst": ReStructedTextCommentStyle, + ".s": LispCommentStyle, ".sass": CssCommentStyle, ".sbt": CCommentStyle, ".sc": CCommentStyle, # SuperCollider source file @@ -763,6 +765,7 @@ class XQueryCommentStyle(CommentStyle): ".coveragerc": PythonCommentStyle, ".dockerignore": PythonCommentStyle, ".editorconfig": PythonCommentStyle, + ".empty": EmptyCommentStyle, ".eslintignore": PythonCommentStyle, ".eslintrc": UncommentableCommentStyle, ".gitattributes": PythonCommentStyle, @@ -777,6 +780,7 @@ class XQueryCommentStyle(CommentStyle): ".pylintrc": PythonCommentStyle, ".Renviron": PythonCommentStyle, ".Rprofile": PythonCommentStyle, + ".shellcheckrc": PythonCommentStyle, ".vimrc": VimCommentStyle, ".yarnrc": PythonCommentStyle, "ansible.cfg": PythonCommentStyle, @@ -800,6 +804,7 @@ class XQueryCommentStyle(CommentStyle): "meson.build": PythonCommentStyle, "meson_options.txt": PythonCommentStyle, "pubspec.lock": UncommentableCommentStyle, + "pylintrc": PythonCommentStyle, "Rakefile": PythonCommentStyle, "requirements.txt": PythonCommentStyle, "ROOT": MlCommentStyle, From e0691c594a9454083773136412829a8b2459c01c Mon Sep 17 00:00:00 2001 From: Anthony Loiseau Date: Fri, 17 Nov 2023 17:41:21 +0100 Subject: [PATCH 2/2] changelog: list new file types recognized by this PR Signed-off-by: Anthony Loiseau --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d4206a7..34a3fad66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,11 @@ CLI command and its behaviour. There are no guarantees of stability for the - More file types are recognised: - Julia (`.jl`) (#815) - Modern Fortran (`.f90`) (#836) + - GNU Linker script (`.ld`) (#862) + - Assembly code (`.s`) (#862) + - Empty placeholders (`.empty`) (#862) + - ShellCheck configuration (`.shellcheckrc`) (#862) + - Pylint in-project configuration (`pylintrc`) (#862) - Display recommendations for steps to fix found issues during a lint. (#698) - Add support for Pijul VCS. Pijul support is not added to the Docker image. (#858)