pylint has been a great tool to get the initial code base into shape
but since then we mostely false postives. All those warnings needed to
be annonated.
This allong wouldn't be reason enough to remove it. The main problem
is that the pylint version on gitlab is updated in the back and
suddenly we get new warnings which are bogus.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This extends the command line syntax for specifying configuration files.
You can now combine files by concatenating them, separated by colons:
kas build base.yml:board.yml:feature.yml
The motivation for this feature is to avoid having to write tons of
configuration files that perform this combinations statically via
includes.
In order to avoid complications and prevent that users shoot themselves
too easily into their feet, we deny the case of distributing the
configuration files over multiple repositories. Either all files
specified on the command line come from the same repo, or they are all
local (without versioning control).
Based on idea by Claudius Heine.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
pycodestyle v2.4.0 checks for W606 (async deprecated), but
we can't disable it on source code level with '# noqa'. Let's disable
the check globaly. We will still catch it with pylint.
By disabling the W606 we need also to list the W503 which was
previously active.
While at it fix following things:
./docs/conf.py:252:6: E121 continuation line under-indented for hanging indent
./docs/conf.py:257:6: E126 continuation line over-indented for hanging indent
./kas/build.py:123:17: W504 line break after binary operator
./kas/configschema.py:48:25: E123 closing bracket does not match indentation of opening bracket's line
./kas/configschema.py:49:21: E123 closing bracket does not match indentation of opening bracket's line
./tests/test_includehandler.py:82:13: E123 closing bracket does not match indentation of opening bracket's line
./tests/test_includehandler.py:121:13: E123 closing bracket does not match indentation of opening bracket's line
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Currently many of the error messages regarding the configuration file
are not really helpful.
To improve reporting this patch adds validation of the configuration
files using the jsonschema module.
Example:
Forgetting ':' at the end of a layer definition, like this:
repos:
meta-iot2000:
layers:
meta-iot2000-example
^
Exception before:
TypeError: string indices must be integers
Exception after:
Validation Error:
'meta-iot2000-example' is not of type 'object'
Failed validating 'type' in schema['properties']['repos']['additionalProperties']['properties']['layers']:
{'additionalProperties': {'oneOf': [{'type': 'null'},
{'type': 'integer'},
{'type': 'boolean'},
{'type': 'string'}]},
'type': 'object'}
On instance['repos']['meta-iot2000']['layers']:
'meta-iot2000-example'
This patch adds 'jsonschema' as an additional dependency.
Signed-off-by: Claudius Heine <ch@denx.de>
Use a separately incremented integer to track the configuration file
format version. We start with 2 due to the change that 23c3a951f6
introduced. 1 is declared to be equivalent to the original '0.10'.
The separate versioning has the advantage of being able to increment it
already during the development cycle, and using it with config files
that test/exploit the new format.
Using an integer has the advantages of a) differentiating it clearly
from the now independent kas version and b) simplifying the version
parsing. We can now also remove the string type restriction.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>