[previous] 4825 [next] Unexpected character.
Annotations

Annotations should be terminated by:

Example:


// PRQA S 100 A1
                      // OK - a new line terminates the annoation

// PRQA S 100 A1      // OK - followed by // denoting a new C++ style comment
/* PRQA S 100 A1 */   // OK - followed by */ denoting the end of the C style comment

After QA·C has parsed an annotation, an error will be produced if there are any tokens remaining. This ensures that QA·C doesn't silently ignore ill-formed annotations.

Example:


// PRQA L:L1 L2 ++    // ERROR - '+' character not expected
// PRQA S Msg A1-B1   // ERROR - "A" is not expected

For the last example, the QA·C parses the annotation as PRQA S Msg. The message is therefore generated against 'A' as being the unexpected character. It is likely that an attempt was made to specify a range of locations, something that is not valid suppression syntax.

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents