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

Add support for RobotFramework #1100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]>
- Alex Railean <[email protected]>
11 changes: 11 additions & 0 deletions changelog.d/feature.784e2262.entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: CC0-1.0

git_email: [email protected]
git_user: Alex Railean
issue_id: null
message: Add support for RobotFramework
os_user: redacted
timestamp: 1731575694
type: feature
11 changes: 11 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 Alex Railean <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -508,6 +509,15 @@ class ReStructedTextCommentStyle(CommentStyle):
INDENT_AFTER_SINGLE = " "


class RobotFrameworkCommentStyle(CommentStyle):
"""RobotFramework comment style."""

SHORTHAND = "robot"

SINGLE_LINE = "#"
INDENT_AFTER_SINGLE = " "


class SemicolonCommentStyle(CommentStyle):
"""Semicolon comment style."""

Expand Down Expand Up @@ -764,6 +774,7 @@ class XQueryCommentStyle(CommentStyle):
".rbx": PythonCommentStyle,
".rkt": LispCommentStyle,
".Rmd": HtmlCommentStyle,
".robot": RobotFrameworkCommentStyle,
".rs": CppCommentStyle,
".rss": HtmlCommentStyle,
".rst": ReStructedTextCommentStyle,
Expand Down
Loading