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

A2-7-3: missing documentation when there's a comment after doxygen grouping #718

Open
fjatWbyT opened this issue Sep 27, 2024 · 1 comment
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Low Standard-AUTOSAR user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@fjatWbyT
Copy link
Contributor

fjatWbyT commented Sep 27, 2024

Affected rules

  • A2-7-3

Description

It appears that adding a comment after the closing characters of a member grouping triggers alerts for the methods inside.

Example

/// @brief Member group b.
struct memgrpb {
  /// @brief Group with comment at the end.
  ///@{
  void memgrpb_func0();
  void memgrpb_func1();
  ///@} End of group
};

/// @brief Member group d.
struct memgrpd {
  /// @brief Group without comment at the end.
  ///@{
  void memgrpd_func0();
  void memgrpd_func1();
  ///@}
};

memgrpb_func1 and memgrpb_func0 are evaluated with missing documentation (in contrast with the functions in memgrpd) on query cpp/autosar/src/rules/A2-7-3/UndocumentedUserDefinedType.ql.

Related to #391.

@fjatWbyT fjatWbyT added the false positive/false negative An issue related to observed false positives or false negatives. label Sep 27, 2024
@lcartey lcartey added the user-report Issue reported by an end user of CodeQL Coding Standards label Oct 15, 2024
@lcartey lcartey added Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address Impact-Low labels Oct 23, 2024
@lcartey lcartey moved this from Reported to Triaged in Coding Standards Public Development Board Oct 23, 2024
@lcartey
Copy link
Collaborator

lcartey commented Oct 23, 2024

The patterns on these lines need to be expanded to support different form of group close:

opening = true and result = ["///@{", "/**@{*/"]
or
opening = false and result = ["///@}", "/**@}*/"]

At the moment this uses the simple matches(...) predicate, but we may need to move to regular expressions to catch more cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Low Standard-AUTOSAR user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

No branches or pull requests

3 participants