diff --git a/bin/install_env b/bin/install_env index 988458f6d06f6e280d05f7327a40c7d21b8a5b4f..c9b41faa82dce1c37fbdd8be9866fc25906db4f9 100755 --- a/bin/install_env +++ b/bin/install_env @@ -112,12 +112,42 @@ class DataParameters(SrcParameters): revid = "08ee4973b18c" +class DataXXParameters(DataParameters): + """Parameters for a configuration of 'data' repository for code_aster++.""" + repo_pull = "codeaster-a12da" + repo_push = None + repo_ci = "jenkins" + identification = "asterdev:asterdev" + revid = "c6b122a7a53e" + + def reponame_for(self, what): + """Return the repository path for different actions.""" + if what != "ci": + return super(DataXXParameters, self).reponame_for(what) + return self.repo_ci + "/data-xx" + + class ValidationParameters(SrcParameters): """Parameters for a configuration of 'data' repository for code_aster.""" base = "validation" revid = "8918a03f384f" +class ValidationXXParameters(DataParameters): + """Parameters for a configuration of 'data' repository for code_aster++.""" + repo_pull = "codeaster-a12da" + repo_push = None + repo_ci = "jenkins" + identification = "asterdev:asterdev" + revid = "54d590227bd7" + + def reponame_for(self, what): + """Return the repository path for different actions.""" + if what != "ci": + return super(ValidationXXParameters, self).reponame_for(what) + return self.repo_ci + "/validation-xx" + + class DevtoolsParameters(ConfigurationParameters): """Parameters for a configuration of the repository for 'devtools'.""" base = "devtools" diff --git a/lib/aslint/filetype.py b/lib/aslint/filetype.py index dfa7f6b62a279b4e2ba50b60c84ba1cf56d9aa54..439d2f97cc3d47550ca7e8ef0e24b7b43f6b4a06 100644 --- a/lib/aslint/filetype.py +++ b/lib/aslint/filetype.py @@ -10,7 +10,7 @@ import re _types = [ ('build', re.compile(r'^(?:|\./)(waf|waf_.*|waf\.(engine|main)|waftools/.*' r'|wafcfg/.*|.*wscript)$')), - ('test', re.compile(r'^(?:|\./)astest/')), + ('test', re.compile(r'^(?:|\./)(astest|tests_data)/')), ('hxx', re.compile(r'^(?:|\./)bibcxx/.*\.h$')), ('cxx', re.compile(r'\.cxx$')), ('h', re.compile(r'^(?:|\./)bibc/.*\.h$')), diff --git a/lib/aslint/python/python_checkers.py b/lib/aslint/python/python_checkers.py index a5a6f1f4c7a230dbcb8e2aae240cc19f1035e01f..37ba0f17d8e7c151e249dc917c4869c02bf6a7fa 100644 --- a/lib/aslint/python/python_checkers.py +++ b/lib/aslint/python/python_checkers.py @@ -2,11 +2,9 @@ """Checkers for python source files""" -from aslint.base_checkers import ( - checkers_from_context, - TextMsg, FileContentCat, -) import aslint.common_checkers as COMM +from aslint.base_checkers import (FileContentCat, TextMsg, + checkers_from_context, search_msg) class LineTooLong(FileContentCat, COMM.LineTooLong): @@ -62,4 +60,12 @@ class InvalidCharacter(FileContentCat, COMM.InvalidCharacter): Tabulation character is not allowed.""" id = "C4006" + +class ExecUsed(FileContentCat, TextMsg): + + """Using 'exec()' is discouraged""" + id = "C4007" + search = search_msg(r"\b(?P<main>exec *\(.*)") + + CHECK_LIST = checkers_from_context(globals(), TextMsg) diff --git a/lib/aslint/test/test_checkers.py b/lib/aslint/test/test_checkers.py index 8a4fd4351355242cc265cddf88ccb3cdb6208e6b..e840ba50e0c798cdaca5b5b2c1c1ce19dc102748 100644 --- a/lib/aslint/test/test_checkers.py +++ b/lib/aslint/test/test_checkers.py @@ -65,7 +65,8 @@ class InvalidFilenameTestsData(FilenameCat, TextMsgNotFound): """ id = "C2019" fmt = "%(id)s: %(label)s" - apply_ctxt = CheckContext(reponame=('data', )) + apply_ctxt = CheckContext(reponame=('data', ), + branch='^(default|v[0-9]+)') def search(self, txt): """Check for unauthorized filenames.""" @@ -518,7 +519,7 @@ class RequiredKeyword(FileContentCat, GenericMsg): A testcase must use one of operators DEBUT or POURSUITE and the keyword CODE.""" apply_to = COMM_EXT - apply_ctxt = CheckContext(branch=['default']) + apply_ctxt = CheckContext(reponame=['src'], branch='^(default|asterxx)') id = 'C2011' _debut = re.compile('^DEBUT', re.M) _debcod = re.compile("^DEBUT *\([^\#]*CODE *= *_F\(", re.M) diff --git a/lib/hgaster/ascommands.py b/lib/hgaster/ascommands.py index bedbe0267d2e748eefb9ab1ad899fc65a9aaa2da..01833b66dfbc5bf6fdfdfecf4f9eafe61ed41c78 100644 --- a/lib/hgaster/ascommands.py +++ b/lib/hgaster/ascommands.py @@ -111,7 +111,7 @@ def submit(ui, repo, *args, **opts): class_ = SubmitDevtools elif reponame in ("data", "src", "validation"): class_ = SubmitAster - elif reponame == "src-xx": + elif reponame in ("data-xx", "src-xx", "validation-xx"): class_ = SubmitAsterXX elif reponame == "salome-codeaster-study": class_ = SubmitAsterStudy diff --git a/lib/hgaster/ext_utils.py b/lib/hgaster/ext_utils.py index eee1ab205d71a437b0c2a7fa3accfce11bf0a9b7..d61731d893af082a4c854582e90ace66d59b87c0 100644 --- a/lib/hgaster/ext_utils.py +++ b/lib/hgaster/ext_utils.py @@ -20,11 +20,14 @@ RE_ISSUE = r'(?P<issue>(?P<type>\#|issue|Issue|bb|BB)(?: ?)(?P<number>[0-9]{4,6} BUGTRACKERS = (None, 'rex', 'bitbucket') # closed issues must be enclosed by '[]': [#1234] -# identifier of the repositories (hash of revision 0) +# identifier of the repositories (hash of revision 0 or of the revision that +# opens the branch for derivated repository) REPOID = OrderedDict([ + ('c6b122a7a53ea4f82f2e4b198e1357f426d66f71', 'data-xx'), ('08ee4973b18cc37bc89a3ed356b91397a352b9c1', 'data'), ('852b9b2bfbed59991756733f65ca422a08df5383', 'src-xx'), ('becdb3e46d91de04ce69a240b714ec9df3a50826', 'src'), + ('54d590227bd7012028615e8be14866b8e22174e3', 'validation-xx'), ('8918a03f384fdd666260a381d5dad564ec0a177d', 'validation'), ('d9ffe8b5560b5799cf9821b9c08d0f6f41497dee', 'devtools'), ('ee137aec1fe656351ca17b42751f2a0de5f157f0', 'salome-codeaster-study'),