From 909a5c529d05803a70d7f25d89bcc0bea277c2ce Mon Sep 17 00:00:00 2001 From: HarelFel Date: Sun, 26 May 2024 09:31:06 +0300 Subject: [PATCH] SC pr with cov --- .coveragerc | 1 + .gitignore | 2 + Jenkinsfile | 0 Makefile | 5 +- coverage.xml | 704 +++++++++++++++++++++++++++++++++++++++ skipper/cli.py | 3 +- sonar-project.properties | 3 + 7 files changed, 714 insertions(+), 4 deletions(-) create mode 100644 Jenkinsfile create mode 100644 coverage.xml create mode 100644 sonar-project.properties diff --git a/.coveragerc b/.coveragerc index 6239aad..ec30b02 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,5 @@ [report] +xml = coverage.xml exclude_lines = def __repr__ if __name__ diff --git a/.gitignore b/.gitignore index 281342a..502c32b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ venv MANIFEST reports **/RCS/** +coverage.xml +.scannerwork \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile index cd68f01..23cf5a0 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,12 @@ build: pep8: pep8 skipper tests -pylint: +lint: mkdir -p reports PYLINTHOME=reports/ pylint skipper tests: - py.test --cov=skipper --cov-report=term-missing - + py.test --cov=skipper --cov-report=html --cov-report=term --cov-report=xml install: pip install -U . diff --git a/coverage.xml b/coverage.xml new file mode 100644 index 0000000..3f0c73a --- /dev/null +++ b/coverage.xml @@ -0,0 +1,704 @@ + + + + + + /home/harelfeldman/work2/skipper/skipper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skipper/cli.py b/skipper/cli.py index 5d58711..7a2e08b 100644 --- a/skipper/cli.py +++ b/skipper/cli.py @@ -475,7 +475,8 @@ def _get_images_to_build(ctx, images_to_build): else: for image in images_to_build: if image not in valid_images: - utils.logger.warning("Image %s is not valid for this project! Skipping...", image) + utils.logger.warning( + "Image %s is not valid for this pccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccroject! Skipping...", image) continue if not os.path.exists(valid_images[image]): utils.logger.warning("Dockerfile %s does not exist! Skipping...", valid_images[image]) diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2182e86 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=Harelfel_skipper +# sonar.python.coverage.reportPaths=coverage.xml +sonar.coverage.exclusions=tests/** \ No newline at end of file