Lint and hic* global variables

Discussion in 'Cadence' started by Marcel Preda, Aug 23, 2010.

  1. Marcel Preda

    Marcel Preda Guest

    Hi there,

    I have this problem since almost 3 years, and now I decide that I have
    to fix it :).
    Before creating the context file I have to be sure that my code is
    Lint clean -that's the rule in the company.
    So to check my files I use next pice of code:
    ~~~~~~~~~~~~~~~~~~
    sklint(
    ?file l_files
    ?outputFile outputFile
    ?prefixes list('MyPrefix) ;; starts with
    UpperCase
    )
    ~~~~~~~~~~~~~~~~~~

    The Lint starts to complain about the hic* variables:
    WARN GLOB (VAR8): hicBottomPercentSet
    WARN GLOB (VAR8): hicErrorDialog
    WARN GLOB (VAR8): hicLeftPercentSet
    WARN GLOB (VAR8): hicMessageDialog
    WARN GLOB (VAR8): hicRightPercentSet
    WARN GLOB (VAR8): hicTopPercentSet
    WARN GLOB (VAR8): hicWarningDialog
    and I get the score: 99 of 100, but I need 100/100 .

    Any idea about how can I fix this ?



    Reading at the sourcelink.cadence.com there is a "solution"
    Solution ID: 11173760, which said:
    ~~~~~~~~~~~~~~~~~
    ......
    The hi, hic, and hiv warnings can be suppressed with these Lint
    options:

    Context: hiBase
    Check For Warnings (on)



    Alternatively, you may run the sklint function in the CIW:
    sklint( ?context "hiBase"
    ?checkCdsPrefixes t
    ?file "myProg.il"
    ?outputFile "LINT.log"
    )

    where
    hiBase = context choice
    checkCdsPrefixes = if t, then check for Cadence function/
    variable prefixes that start with lower case
    myProg.il = SKILL program file
    Lint.log = output Lint log file name

    As a result, the hi, hic, and hiv global variable warnings will be
    replaced by this Lint information message:
    INFO (PREFIXES): Using prefixes: (hi hic hiv)
    ~~~~~~~~~~~~~~~~~~~~~~~~


    So, I've changed my code:

    sklint(
    ?file l_files
    ?outputFile outputFile
    ?prefixes list('MyPrefix) ;; starts with UpperCase
    ?context "hiBase"
    ?checkCdsPrefixes t
    )

    Now Lint gives more warnings.
    First it complains --- WARN (PREFIX1): Prefixes must start with a
    lower case character : MyPrefix
    After that for each access to my global vars I get a warning, and in
    the end the score is 98/100 .
    Probable the trick will work if I will not have global vars.
    But I need some global vars because:
    - forms
    - some global vars to act as cache data.

    From what I know the my global vars have to start with UpperCase,
    that's a kind of convention written in some Cadence documentation.


    Best Regards,
    Marcel
     
    Marcel Preda, Aug 23, 2010
    #1
  2. Marcel Preda wrote, on 08/23/10 11:36:
    Hi Marcel,

    I tend to do this by doing:

    skIgnoreMessage('STRICT)

    and then setting my prefix list to be list('MyPrefix 'hic)

    That should do it. Or you can just do this skIgnoreMessage, and then do the call
    you're doing but omit the ?checkCdsPrefixes t.

    Regards,

    Andrew.
     
    Andrew Beckett, Aug 31, 2010
    #2
  3. Marcel Preda

    Marcel Preda Guest


    Hi Andrew,

    Thank you very much.
    I'll try it next days.
    If it will not work I'll bother you again :)

    Release already done with the hic* warnings.


    BR,
    Marcel
     
    Marcel Preda, Sep 1, 2010
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.