diff --git a/src/main/resources/org/eolang/lints/comments/comment-not-capitalized.xsl b/src/main/resources/org/eolang/lints/comments/comment-not-capitalized.xsl index 822b6afd1..7b218c496 100644 --- a/src/main/resources/org/eolang/lints/comments/comment-not-capitalized.xsl +++ b/src/main/resources/org/eolang/lints/comments/comment-not-capitalized.xsl @@ -10,7 +10,7 @@ - + diff --git a/src/main/resources/org/eolang/motives/comments/comment-not-capitalized.md b/src/main/resources/org/eolang/motives/comments/comment-not-capitalized.md index 5c81d4c54..40a2ffab6 100644 --- a/src/main/resources/org/eolang/motives/comments/comment-not-capitalized.md +++ b/src/main/resources/org/eolang/motives/comments/comment-not-capitalized.md @@ -17,3 +17,12 @@ Correct: [] > foo 42 > @ ``` + +Comments that begin with a tracker marker such as `@todo` or `@fixme` +(case-insensitive) are exempt from this rule: + +```eo +# @todo #123:30min Add validation for negative input. +[] > foo + 42 > @ +``` diff --git a/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-fixme-marker.yaml b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-fixme-marker.yaml new file mode 100644 index 000000000..aa3dd0fee --- /dev/null +++ b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-fixme-marker.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com +# SPDX-License-Identifier: MIT +--- +sheets: + - /org/eolang/lints/comments/comment-not-capitalized.xsl +asserts: + - /defects[count(defect[@severity='warning'])=0] +input: | + # @fixme this needs revisiting once the parser supports X. + [] > foo + 42 > @ diff --git a/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-case-insensitive.yaml b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-case-insensitive.yaml new file mode 100644 index 000000000..85af68476 --- /dev/null +++ b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-case-insensitive.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com +# SPDX-License-Identifier: MIT +--- +sheets: + - /org/eolang/lints/comments/comment-not-capitalized.xsl +asserts: + - /defects[count(defect[@severity='warning'])=0] +input: | + # @TODO #999:30min uppercase marker is also accepted. + [] > foo + 42 > @ diff --git a/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-marker.yaml b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-marker.yaml new file mode 100644 index 000000000..96508ec1a --- /dev/null +++ b/src/test/resources/org/eolang/lints/packs/single/comment-not-capitalized/allows-todo-marker.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com +# SPDX-License-Identifier: MIT +--- +sheets: + - /org/eolang/lints/comments/comment-not-capitalized.xsl +asserts: + - /defects[count(defect[@severity='warning'])=0] +input: | + # @todo #4475:35min Enable this feature after resize is implemented. + [] > foo + 42 > @