Skip to content

Commit 02f8313

Browse files
committed
Merge branch 'devel'
2 parents e9d82b0 + 7eac7d8 commit 02f8313

File tree

11 files changed

+131
-242
lines changed

11 files changed

+131
-242
lines changed

.github/workflows/python-package.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Python package
2+
3+
on:
4+
push:
5+
branches: [ master, devel ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: [3.7, 3.8, 3.9]
18+
exclude:
19+
- os: macos-latest
20+
python-version: 3.8
21+
- os: macos-latest
22+
python-version: 3.9
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install Clang (on Windows)
31+
if: runner.os == 'Windows'
32+
run: |
33+
choco install llvm
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
python -m pip install flake8 nose lit
38+
python -m pip install -r requirements.txt
39+
- name: Lint with flake8
40+
run: |
41+
# stop the build if there are Python syntax errors or undefined names
42+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
43+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
44+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
45+
- name: Test with nose
46+
run: |
47+
nosetests tests/unit --verbose
48+
- name: Test with lit
49+
if: runner.os != 'Windows'
50+
run: |
51+
lit -v tests
52+
- name: Test with lit (on Windows)
53+
if: runner.os == 'Windows'
54+
run: |
55+
pip install . --use-feature=in-tree-build
56+
lit -DUSE_INSTALLED=true -v tests

.github/workflows/python-publish.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*

.travis.yml

-101
This file was deleted.

README.rst

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
.. image:: https://travis-ci.org/rizsotto/scan-build.svg?branch=master
2-
:target: https://travis-ci.org/rizsotto/scan-build
3-
4-
.. image:: https://ci.appveyor.com/api/projects/status/k5fi1xy90xieqxir/branch/master?svg=true
5-
:target: https://ci.appveyor.com/project/rizsotto/scan-build/branch/master
6-
7-
.. image:: https://coveralls.io/repos/github/rizsotto/scan-build/badge.svg?branch=master
8-
:target: https://coveralls.io/github/rizsotto/scan-build?branch=master
9-
101
.. image:: https://img.shields.io/pypi/v/scan-build.svg
112
:target: https://pypi.python.org/pypi/scan-build
123

@@ -53,7 +44,7 @@ Prerequisites
5344
-------------
5445

5546
1. **clang compiler**, to compile the sources and have the static analyzer.
56-
2. **python** interpreter (version 2.7, 3.4, 3.5, 3.6, 3.7).
47+
2. **python** interpreter (version 3.6, 3.7, 3.8, 3.9).
5748

5849

5950
How to use

appveyor.yml

-76
This file was deleted.

libscanbuild/report.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -399,20 +399,21 @@ def parse_bug_plist(filename):
399399
# type: (str) -> Generator[Bug, None, None]
400400
""" Returns the generator of bugs from a single .plist file. """
401401

402-
content = plistlib.readPlist(filename)
403-
files = content.get('files', [])
404-
for bug in content.get('diagnostics', []):
405-
if len(files) <= int(bug['location']['file']):
406-
logging.warning('Parsing bug from "%s" failed', filename)
407-
continue
408-
409-
yield Bug(filename, {
410-
'bug_type': bug['type'],
411-
'bug_category': bug['category'],
412-
'bug_line': bug['location']['line'],
413-
'bug_path_length': bug['location']['col'],
414-
'bug_file': files[int(bug['location']['file'])]
415-
})
402+
with open(filename, 'rb') as handle:
403+
content = plistlib.load(handle)
404+
files = content.get('files', [])
405+
for bug in content.get('diagnostics', []):
406+
if len(files) <= int(bug['location']['file']):
407+
logging.warning('Parsing bug from "%s" failed', filename)
408+
continue
409+
410+
yield Bug(filename, {
411+
'bug_type': bug['type'],
412+
'bug_category': bug['category'],
413+
'bug_line': bug['location']['line'],
414+
'bug_path_length': bug['location']['col'],
415+
'bug_file': files[int(bug['location']['file'])]
416+
})
416417

417418

418419
def parse_bug_html(filename):

setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@
3535
"Environment :: Console", "Operating System :: POSIX",
3636
"Operating System :: MacOS :: MacOS X",
3737
"Intended Audience :: Developers", "Programming Language :: C",
38-
"Programming Language :: Python :: 2",
39-
"Programming Language :: Python :: 2.7",
4038
"Programming Language :: Python :: 3",
41-
"Programming Language :: Python :: 3.4",
42-
"Programming Language :: Python :: 3.5",
4339
"Programming Language :: Python :: 3.6",
4440
"Programming Language :: Python :: 3.7",
41+
"Programming Language :: Python :: 3.8",
42+
"Programming Language :: Python :: 3.9",
4543
"Topic :: Software Development :: Compilers",
4644
"Topic :: Software Development :: Quality Assurance"
4745
])

0 commit comments

Comments
 (0)