This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Envoyer le resultat du test dans un fichier PC-Lint

pour enregistrer les resultats dans un fichier,
exemple:

lint-nt au-misra1.lnt ltest.c >result.txt

Parents Reply Children
  • Hi, I have another question, how can we check the "NAMING CONVENTION" with PC-Lint? I didn't any informations about it.
    With the SP-Lint, another tool it seems to be able to check "naming conventions".
    Please when you have more informations tel me.
    Thank you,

    Gillo.

  • what "NAMING CONVENTIONS" do you want to check?

  • For example:

    1 - Macros- Macro identifiers are all full capital letters. Words are separated by an underscore '_'.
    Ex: #define MAX(a,b) ((a)>(b) ? (a) : (b))

    2 -Indirections- When #define is used to create a shortcut to a variable, the identifier should follow the same rules as
    variable identifiers.
    Ex: #define gucActiveCells Algo_gstData.ucActiveCells

    3 -Basic types-
    The basic types are defined to be:
    New type.....type............Size........Range
    uint8_t......Unsigned char...8 bit.......0..255
    int8_t.......Signed char.....7+sign bit..-128..+127
    ..... ..... .... ......

    These types are defined in the file stdint.h that should be available for every compiler. If this is not the case, it has to be created according to the definitions mentioned above.
    Only these basic types have to be used. Use typedefs to define any other user-defined types based only
    on the above basic types.

    Type prefixes are used in variable, field and function names.

    Type prefix.........Type
    uc..................uint8_t
    sc..................int8_t
    us..................uint16_t
    ... ......

    In case the value is a pointer to a variable, the type prefix is prefixed with 'p'.
    In case the value is constant, the type prefix is prefixed with 'c'.
    In case the value is an array, an 'a' is appended to the type prefix.