@opensip-tools/checks-python 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test.log +15 -0
- package/.turbo/turbo-typecheck.log +1 -1
- package/dist/__tests__/analyze.test.d.ts +2 -0
- package/dist/__tests__/analyze.test.d.ts.map +1 -0
- package/dist/__tests__/analyze.test.js +35 -0
- package/dist/__tests__/analyze.test.js.map +1 -0
- package/dist/__tests__/no-bare-except.test.d.ts +2 -0
- package/dist/__tests__/no-bare-except.test.d.ts.map +1 -0
- package/dist/__tests__/no-bare-except.test.js +71 -0
- package/dist/__tests__/no-bare-except.test.js.map +1 -0
- package/dist/checks/no-bare-except.d.ts +23 -0
- package/dist/checks/no-bare-except.d.ts.map +1 -0
- package/dist/checks/no-bare-except.js +52 -0
- package/dist/checks/no-bare-except.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
> @opensip-tools/checks-python@1.0.5 test /home/runner/work/opensip-tools/opensip-tools/packages/fitness/checks-python
|
|
3
|
+
> vitest run --passWithNoTests
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[1m[7m[36m RUN [39m[27m[22m [36mv2.1.9 [39m[90m/home/runner/work/opensip-tools/opensip-tools/packages/fitness/checks-python[39m
|
|
7
|
+
|
|
8
|
+
[32m✓[39m src/__tests__/no-bare-except.test.ts [2m([22m[2m7 tests[22m[2m)[22m[90m 30[2mms[22m[39m
|
|
9
|
+
[32m✓[39m src/__tests__/analyze.test.ts [2m([22m[2m7 tests[22m[2m)[22m[90m 50[2mms[22m[39m
|
|
10
|
+
|
|
11
|
+
[2m Test Files [22m [1m[32m2 passed[39m[22m[90m (2)[39m
|
|
12
|
+
[2m Tests [22m [1m[32m14 passed[39m[22m[90m (14)[39m
|
|
13
|
+
[2m Start at [22m 05:38:39
|
|
14
|
+
[2m Duration [22m 9.35s[2m (transform 2.71s, setup 0ms, collect 13.79s, tests 80ms, environment 0ms, prepare 1.25s)[22m
|
|
15
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @opensip-tools/checks-python@1.0.
|
|
2
|
+
> @opensip-tools/checks-python@1.0.5 typecheck /home/runner/work/opensip-tools/opensip-tools/packages/fitness/checks-python
|
|
3
3
|
> tsc --noEmit
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/analyze.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { analyzeBareExcept } from '../checks/no-bare-except.js';
|
|
3
|
+
describe('analyzeBareExcept', () => {
|
|
4
|
+
it('flags a bare except:', () => {
|
|
5
|
+
const out = analyzeBareExcept('try:\n foo()\nexcept:\n pass\n');
|
|
6
|
+
expect(out).toHaveLength(1);
|
|
7
|
+
expect(out[0]?.severity).toBe('warning');
|
|
8
|
+
expect(out[0]?.line).toBe(3);
|
|
9
|
+
});
|
|
10
|
+
it('flags a bare except : with whitespace before the colon', () => {
|
|
11
|
+
const out = analyzeBareExcept('try:\n foo()\nexcept :\n pass\n');
|
|
12
|
+
expect(out).toHaveLength(1);
|
|
13
|
+
});
|
|
14
|
+
it('does not flag a typed except', () => {
|
|
15
|
+
expect(analyzeBareExcept('try:\n foo()\nexcept Exception:\n pass\n')).toHaveLength(0);
|
|
16
|
+
});
|
|
17
|
+
it('does not flag except with parentheses (multi-type)', () => {
|
|
18
|
+
expect(analyzeBareExcept('try:\n foo()\nexcept (KeyError, ValueError):\n pass\n')).toHaveLength(0);
|
|
19
|
+
});
|
|
20
|
+
it('flags multiple bare excepts in the same file', () => {
|
|
21
|
+
const src = 'try:\n a()\nexcept:\n pass\ntry:\n b()\nexcept:\n pass\n';
|
|
22
|
+
const out = analyzeBareExcept(src);
|
|
23
|
+
expect(out).toHaveLength(2);
|
|
24
|
+
});
|
|
25
|
+
it('returns an empty list for code without except clauses', () => {
|
|
26
|
+
expect(analyzeBareExcept('def foo(): return 1\n')).toEqual([]);
|
|
27
|
+
});
|
|
28
|
+
it('respects leading indentation (nested try)', () => {
|
|
29
|
+
const src = 'def f():\n try:\n a()\n except:\n pass\n';
|
|
30
|
+
const out = analyzeBareExcept(src);
|
|
31
|
+
expect(out).toHaveLength(1);
|
|
32
|
+
expect(out[0]?.line).toBe(4);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=analyze.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../../src/__tests__/analyze.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,GAAG,GAAG,iBAAiB,CAAC,sCAAsC,CAAC,CAAC;QACtE,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,MAAM,GAAG,GAAG,iBAA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":"no-bare-except.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/no-bare-except.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { analyzeBareExcept } from '../checks/no-bare-except.js';
|
|
3
|
+
describe('analyzeBareExcept', () => {
|
|
4
|
+
it('flags `except:` on its own line', () => {
|
|
5
|
+
const src = `try:
|
|
6
|
+
risky()
|
|
7
|
+
except:
|
|
8
|
+
pass`;
|
|
9
|
+
const violations = analyzeBareExcept(src);
|
|
10
|
+
expect(violations.length).toBe(1);
|
|
11
|
+
expect(violations[0]?.message).toContain('Bare');
|
|
12
|
+
expect(violations[0]?.line).toBe(3);
|
|
13
|
+
});
|
|
14
|
+
it('does not flag `except Exception:`', () => {
|
|
15
|
+
const src = `try:
|
|
16
|
+
risky()
|
|
17
|
+
except Exception:
|
|
18
|
+
pass`;
|
|
19
|
+
const violations = analyzeBareExcept(src);
|
|
20
|
+
expect(violations.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
it('does not flag `except (TypeError, ValueError):`', () => {
|
|
23
|
+
const src = `try:
|
|
24
|
+
risky()
|
|
25
|
+
except (TypeError, ValueError):
|
|
26
|
+
pass`;
|
|
27
|
+
const violations = analyzeBareExcept(src);
|
|
28
|
+
expect(violations.length).toBe(0);
|
|
29
|
+
});
|
|
30
|
+
it('does not flag `except Exception as e:`', () => {
|
|
31
|
+
const src = `try:
|
|
32
|
+
risky()
|
|
33
|
+
except Exception as e:
|
|
34
|
+
log(e)`;
|
|
35
|
+
const violations = analyzeBareExcept(src);
|
|
36
|
+
expect(violations.length).toBe(0);
|
|
37
|
+
});
|
|
38
|
+
it('reports correct line number for indented bare except', () => {
|
|
39
|
+
const src = `def fn():
|
|
40
|
+
try:
|
|
41
|
+
risky()
|
|
42
|
+
except:
|
|
43
|
+
pass`;
|
|
44
|
+
const violations = analyzeBareExcept(src);
|
|
45
|
+
expect(violations.length).toBe(1);
|
|
46
|
+
expect(violations[0]?.line).toBe(4);
|
|
47
|
+
});
|
|
48
|
+
it('flags multiple bare excepts independently', () => {
|
|
49
|
+
const src = `try:
|
|
50
|
+
a()
|
|
51
|
+
except:
|
|
52
|
+
pass
|
|
53
|
+
try:
|
|
54
|
+
b()
|
|
55
|
+
except:
|
|
56
|
+
pass`;
|
|
57
|
+
const violations = analyzeBareExcept(src);
|
|
58
|
+
expect(violations.length).toBe(2);
|
|
59
|
+
expect(violations[0]?.line).toBe(3);
|
|
60
|
+
expect(violations[1]?.line).toBe(7);
|
|
61
|
+
});
|
|
62
|
+
it('tolerates whitespace between `except` and `:`', () => {
|
|
63
|
+
const src = `try:
|
|
64
|
+
a()
|
|
65
|
+
except :
|
|
66
|
+
pass`;
|
|
67
|
+
const violations = analyzeBareExcept(src);
|
|
68
|
+
expect(violations.length).toBe(1);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=no-bare-except.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-bare-except.test.js","sourceRoot":"","sources":["../../src/__tests__/no-bare-except.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAE/D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,GAAG,GAAG;;;SAGP,CAAA;QACL,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;QACzC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QAChD,MAAM,CAAC,U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;;;;;;SAOP,CAAA;QACL,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;QACzC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,GAAG,GAAG;;;SAGP,CAAA;QACL,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;QACzC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Flag bare `except:` clauses in Python.
|
|
3
|
+
*
|
|
4
|
+
* A bare `except:` catches every exception, including ones that are
|
|
5
|
+
* usually meant to propagate — KeyboardInterrupt, SystemExit, and any
|
|
6
|
+
* subclass of BaseException. This makes programs harder to terminate
|
|
7
|
+
* and hides bugs. The Python style guide and most lint tools (ruff
|
|
8
|
+
* E722, pylint W0702) flag this. Always specify what you're catching,
|
|
9
|
+
* even if it's just `except Exception:`.
|
|
10
|
+
*
|
|
11
|
+
* Detection is line-pattern based: a line whose first non-whitespace
|
|
12
|
+
* characters are `except:` (with optional whitespace before the colon).
|
|
13
|
+
* The check uses `strip-strings` content filtering so a literal like
|
|
14
|
+
* `"except:"` inside a docstring or string doesn't false-fire.
|
|
15
|
+
*/
|
|
16
|
+
import { type CheckViolation } from '@opensip-tools/fitness';
|
|
17
|
+
/**
|
|
18
|
+
* Pure analysis function. Exported so unit tests can exercise the
|
|
19
|
+
* detection logic without standing up the full Check framework.
|
|
20
|
+
*/
|
|
21
|
+
export declare function analyzeBareExcept(content: string): CheckViolation[];
|
|
22
|
+
export declare const noBareExcept: import("@opensip-tools/fitness").Check;
|
|
23
|
+
//# sourceMappingURL=no-bare-except.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-bare-except.d.ts","sourceRoot":"","sources":["../../src/checks/no-bare-except.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAKzE;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAgBnE;AAED,eAAO,MAAM,YAAY,wCAWvB,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Flag bare `except:` clauses in Python.
|
|
3
|
+
*
|
|
4
|
+
* A bare `except:` catches every exception, including ones that are
|
|
5
|
+
* usually meant to propagate — KeyboardInterrupt, SystemExit, and any
|
|
6
|
+
* subclass of BaseException. This makes programs harder to terminate
|
|
7
|
+
* and hides bugs. The Python style guide and most lint tools (ruff
|
|
8
|
+
* E722, pylint W0702) flag this. Always specify what you're catching,
|
|
9
|
+
* even if it's just `except Exception:`.
|
|
10
|
+
*
|
|
11
|
+
* Detection is line-pattern based: a line whose first non-whitespace
|
|
12
|
+
* characters are `except:` (with optional whitespace before the colon).
|
|
13
|
+
* The check uses `strip-strings` content filtering so a literal like
|
|
14
|
+
* `"except:"` inside a docstring or string doesn't false-fire.
|
|
15
|
+
*/
|
|
16
|
+
import { defineCheck } from '@opensip-tools/fitness';
|
|
17
|
+
// eslint-disable-next-line sonarjs/slow-regex -- anchored, bounded line scan; \s* on bounded leading whitespace is safe
|
|
18
|
+
const BARE_EXCEPT_PATTERN = /^\s*except\s*:/gm;
|
|
19
|
+
/**
|
|
20
|
+
* Pure analysis function. Exported so unit tests can exercise the
|
|
21
|
+
* detection logic without standing up the full Check framework.
|
|
22
|
+
*/
|
|
23
|
+
export function analyzeBareExcept(content) {
|
|
24
|
+
const violations = [];
|
|
25
|
+
BARE_EXCEPT_PATTERN.lastIndex = 0;
|
|
26
|
+
let match;
|
|
27
|
+
while ((match = BARE_EXCEPT_PATTERN.exec(content)) !== null) {
|
|
28
|
+
// Compute 1-based line number from match index.
|
|
29
|
+
const upto = content.slice(0, match.index);
|
|
30
|
+
const line = upto.split('\n').length;
|
|
31
|
+
violations.push({
|
|
32
|
+
message: 'Bare `except:` catches BaseException — including KeyboardInterrupt and SystemExit',
|
|
33
|
+
severity: 'warning',
|
|
34
|
+
line,
|
|
35
|
+
suggestion: 'Catch a specific exception (e.g. `except Exception:` or a narrower type)',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return violations;
|
|
39
|
+
}
|
|
40
|
+
export const noBareExcept = defineCheck({
|
|
41
|
+
id: 'b1c2d3e4-9876-4321-bbbb-200000000001',
|
|
42
|
+
slug: 'python-no-bare-except',
|
|
43
|
+
description: 'Bare except clauses catch system-exiting exceptions like KeyboardInterrupt',
|
|
44
|
+
scope: { languages: ['python'], concerns: [] },
|
|
45
|
+
tags: ['quality', 'python'],
|
|
46
|
+
// Use 'strip-strings' so a literal `"except:"` inside a string is
|
|
47
|
+
// not matched. Comments are still visible — but `# except:` won't
|
|
48
|
+
// match the leading-whitespace anchor since `#` is in the way.
|
|
49
|
+
contentFilter: 'strip-strings',
|
|
50
|
+
analyze: (content) => analyzeBareExcept(content),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=no-bare-except.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-bare-except.js","sourceRoot":"","sources":["../../src/checks/no-bare-except.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,WAAW,EAAuB,MAAM,wBA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
+
export declare const metadata: {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
export { noBareExcept } from './checks/no-bare-except.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,mDAA0B,CAAA;AAG7C,eAAO,MAAM,QAAQ;;;;CAIpB,CAAA;AAED,OAAO,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { noBareExcept } from './checks/no-bare-except.js';
|
|
2
|
+
export const checks = [noBareExcept];
|
|
3
|
+
export const metadata = {
|
|
4
|
+
name: '@opensip-tools/checks-python',
|
|
5
|
+
version: '0.6.1',
|
|
6
|
+
description: 'Python fitness checks',
|
|
7
|
+
};
|
|
8
|
+
export { noBareExcept } from './checks/no-bare-except.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,YAAY,CAAU,CAAA;AAG7C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,uBAAuB;CACrC,CAAA;AAED,OAAO,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensip-tools/checks-python",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Python fitness checks for opensip-tools",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
".": "./dist/index.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@opensip-tools/fitness": "1.0.
|
|
22
|
+
"@opensip-tools/fitness": "1.0.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.0.0",
|