VirtualBox

Changeset 61279 in vbox for trunk/Config.kmk


Ignore:
Timestamp:
May 29, 2016 5:05:46 PM (9 years ago)
Author:
vboxsync
Message:

Config.kmk: pylint version detection updates. Update options to work with 1.5.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r61234 r61279  
    17911791
    17921792#
    1793 # pylint setup, see http://www.logilab.org/857.
    1794 # Supported are 0.21.0 - 0.25.2, but no 0.26.0.
     1793# pylint setup, see https://www.pylint.org/.
    17951794#
    17961795# Disabled:
     
    18031802#   C0321 - More than one statement on a single line.
    18041803#   R0201 - Method could be a function.
     1804#   C0326 - ????
     1805#   W0123 - ????
     1806#   C0330:bad-continuation - Wrong continued indentation (add X spaces).
     1807#         * Triggering on perfectly legal comments in array initializers and stuff.
     1808#   C0413:wrong-import-position - Import "YYYYY XXXXX" should be placed at the top of the module.
     1809#         * False positives due to __copyright__, __version__, probably.
     1810#   E0012:bad-option-value - Bad option value XXXXX.
     1811#         * Newere pylint doesn't grok older warning disables in sources (e.g. W0142 in db.py). Wonderful!
    18051812#
    18061813# Note! Yes, --max-branchs is a typo, but not by me.
     
    18191826if !defined(VBOX_WITH_PYLINT) && defined(VBOX_PYLINT)
    18201827 VBOX_WITH_PYLINT := 1
    1821 endif
    1822 VBOX_PYLINT_FLAGS   := --report=n \
    1823         $(if-expr !defined(VBOX_WITH_PYLINT_PRE_V1_0)\
     1828 ifndef VBOX_PYLINT_VERSION
     1829  ifdef VBOX_WITH_PYLINT_PRE_V1_0
     1830   VBOX_PYLINT_VERSION =  9999
     1831  else ifdef VBOX_WITH_PYLINT_V1_2_1_PLUS
     1832   VBOX_PYLINT_VERSION = 10201
     1833  else ifdef VBOX_WITH_PYLINT_V1_1_PLUS
     1834   VBOX_PYLINT_VERSION = 10100
     1835  else
     1836   VBOX_PYLINT_VERSION = 10000
     1837  endif
     1838 endif
     1839endif
     1840VBOX_PYLINT_FLAGS = $(if-expr $(VBOX_PYLINT_VERSION) >= 10500,--reports=n,--report=n,) \
     1841        $(if-expr $(VBOX_PYLINT_VERSION) >= 10000\
    18241842          ,--msg-template='{path}:{line}: <{msg_id}>({obj}:{symbol}): {msg}' \
    18251843          ,--output-format=msvs --include-ids=y) \
     
    18281846        --max-line-length=130 \
    18291847        --max-attributes=20 \
    1830         --max-branch$(if-expr !defined(VBOX_WITH_PYLINT_PRE_V1_0),e,)s=50 \
     1848        --max-branch$(if-expr $(VBOX_PYLINT_VERSION) >= 10000,e,)s=50 \
    18311849        --max-statements=100 \
    18321850        --max-returns=100 \
     
    18451863        --const-rgx='(g_(k|)[abcdefhmnpilorstu]+[A-Z][a-zA-Z0-9]+|[A-Z_][A-Z0-9_]+|__copyright__|__version__|__file__|__all__)$(DOLLAR)' \
    18461864        --good-names='i,j,k,t,o,c,e,ch,s,_' \
    1847         $(if-expr !defined(VBOX_WITH_PYLINT_PRE_V1_0),--class-attribute-rgx='(k[abcdefhmnpilorstu]+[A-Z0-9][a-zA-Z0-9_]{0,32}|[A-Z_][A-Z0-9_]{2,32})',) \
    1848        $(if-expr defined(VBOX_WITH_PYLINT_V1_1_PLUS) || defined(VBOX_WITH_PYLINT_V1_2_1_PLUS),--disable=C0326,) \
    1849        $(if-expr defined(VBOX_WITH_PYLINT_V1_2_1_PLUS),--disable=C0330 --disable=W0123,) \
     1865        $(if-expr $(VBOX_PYLINT_VERSION) >= 10000,--class-attribute-rgx='(k[abcdefhmnpilorstu]+[A-Z0-9][a-zA-Z0-9_]{0,32}|[A-Z_][A-Z0-9_]{2,32})',) \
     1866        $(if-expr $(VBOX_PYLINT_VERSION) >= 10500,--max-nested-blocks=9,) \
     1867       $(if-expr $(VBOX_PYLINT_VERSION) >= 10100,--disable=C0326,) \
     1868       $(if-expr $(VBOX_PYLINT_VERSION) >= 10201,--disable=C0330 --disable=W0123,) \
     1869       $(if-expr $(VBOX_PYLINT_VERSION) >= 10500,--disable=C0413 --disable=E0012,) \
    18501870        --disable=W0301,W0511,W0603,W0702,W0703,C0321,R0201,I0011 \
    18511871        --ignored-classes=testdriver.vboxcon \
     
    25532573 VBOX_NASM_CHECK =
    25542574endif
     2575
     2576# Figures the pylin version.
     2577VBOX_PYLINT_FIGURE_VERSION = $(shell $(1) --version 2> /dev/null \
     2578        | $(SED_EXT) -n -e 's|^ *pylint *\([0-9][0-9]*\).\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$(DOLLAR)|$$(expr \1 * 10000 + \2 * 100 + \3)|p' )
    25552579
    25562580# No $(QUIET) here as it's interesting to see what goes into the file.
     
    27122736        $(QUIET)$(APPEND) '$@' 'VBOX_SOLARIS_11_UPDATE_VERSION := $$(word 3, $$(subst ., ,$$(word 2,$$(subst -, ,$$(VBOX_SOLARIS_11_FULLVERSION)))))'
    27132737        $(QUIET)$(APPEND) '$@' 'VBOX_SOLARIS_11_BUILD_VERSION  := $$(word 6, $$(subst ., ,$$(word 2,$$(subst -, ,$$(VBOX_SOLARIS_11_FULLVERSION)))))'
     2738endif
     2739if defined(VBOX_WITH_PYLINT) && !defined(VBOX_WITH_PYLINT_PRE_V1_0) && !defined(VBOX_WITH_PYLINT_V1_1_PLUS) && !defined(VBOX_WITH_PYLINT_V1_2_1_PLUS)
     2740        $(QUIET)$(APPEND) '$@' "VBOX_PYLINT_VERSION  := $(call VBOX_PYLINT_FIGURE_VERSION, $(VBOX_PYLINT))"
    27142741endif
    27152742
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette