Add configurable inline-comment whitespace rule and enable for Bash #2
+522
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
#comments with a configurable parser option to avoid ad-hoc per-language code and make the rule data-driven.$#or${#var}are not mis-highlighted as comments in Bash.Description
src/Data/Parser/inline_comment_parser.hppandsrc/Data/Parser/inline_comment_parser.cpp(m_require_space_beforeandset_require_space_before).can_parse()whenm_require_space_beforeis true and the previous character is not whitespace ininline_comment_parser.cpp.space_beforecomment feature inprog_language_rep::customize_commentinsrc/System/Language/prog_language.cppso languages can enable the rule via parser features and removed the previous Bash-specific#handling inget_color.(space_before "true")to the Bash language config inTeXmacs/plugins/bash/progs/code/bash-lang.scmunder thecommentparser feature.Testing
Codex Task