mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #514 from markshannon/python-remove-architect-tests
Python tests: Remove some obsolete tests.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
| a.py:1:1:1:8 | Import | $@ imports $@. This violates the explicit rule against dependencies from "G2" to "G3". | a.py:0:0:0:0 | Module a | a | b.py:0:0:0:0 | Module b | b |
|
||||
@@ -1 +0,0 @@
|
||||
Architect/ForbiddenDependency.ql
|
||||
@@ -1,4 +0,0 @@
|
||||
import b
|
||||
|
||||
class A(B):
|
||||
pass
|
||||
@@ -1,4 +0,0 @@
|
||||
import c
|
||||
|
||||
class B(C):
|
||||
pass
|
||||
@@ -1,5 +0,0 @@
|
||||
import b
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
b = B()
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<architecture>
|
||||
<patternMode>regex</patternMode>
|
||||
<group name="G1" groupRule="unrestricted">
|
||||
<unit name="G2" filePattern="${source_location}.*/a.py" />
|
||||
<unit name="G3" filePattern="${source_location}.*/b.py" />
|
||||
<unit name="G4" filePattern="${source_location}.*/c.py" />
|
||||
</group>
|
||||
<!-- Only G2 to G3 dependency should be disallowed -->
|
||||
<disallow originContainers="G2" targetContainers="G3" />
|
||||
</architecture>
|
||||
@@ -1,2 +0,0 @@
|
||||
| b.py:1:1:1:8 | Import | $@ imports $@. This violates the "independent" group rule on "G1", which disallows dependencies from "G3" to "G4. | b.py:0:0:0:0 | Module b | b | c.py:0:0:0:0 | Module c | c |
|
||||
| c.py:1:1:1:8 | Import | $@ imports $@. This violates the "independent" group rule on "G1", which disallows dependencies from "G4" to "G3. | c.py:0:0:0:0 | Module c | c | b.py:0:0:0:0 | Module b | b |
|
||||
@@ -1 +0,0 @@
|
||||
Architect/ForbiddenDependency.ql
|
||||
@@ -1,4 +0,0 @@
|
||||
import b
|
||||
|
||||
class A(B):
|
||||
pass
|
||||
@@ -1,4 +0,0 @@
|
||||
import c
|
||||
|
||||
class B(C):
|
||||
pass
|
||||
@@ -1,5 +0,0 @@
|
||||
import b
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
b = B()
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<architecture>
|
||||
<patternMode>regex</patternMode>
|
||||
<group name="G1" groupRule="independent">
|
||||
<unit name="G2" filePattern="${source_location}.*/a.py" />
|
||||
<unit name="G3" filePattern="${source_location}.*/b.py" />
|
||||
<unit name="G4" filePattern="${source_location}.*/c.py" />
|
||||
</group>
|
||||
<!-- Explicitly allow the G2 to G3 dependency -->
|
||||
<allow originContainers="G2" targetContainers="G3" />
|
||||
</architecture>
|
||||
@@ -1,2 +0,0 @@
|
||||
| a.py:1:1:1:8 | Import | $@ imports $@. This violates the explicit rule against dependencies from "G2" to "G3". | a.py:0:0:0:0 | Module a | a | b.py:0:0:0:0 | Module b | b |
|
||||
| c.py:1:1:1:8 | Import | $@ imports $@. This violates the "ordered" group rule on "G1", which disallows dependencies from "G4" to "G3. | c.py:0:0:0:0 | Module c | c | b.py:0:0:0:0 | Module b | b |
|
||||
@@ -1 +0,0 @@
|
||||
Architect/ForbiddenDependency.ql
|
||||
@@ -1,4 +0,0 @@
|
||||
import b
|
||||
|
||||
class A(B):
|
||||
pass
|
||||
@@ -1,4 +0,0 @@
|
||||
import c
|
||||
|
||||
class B(C):
|
||||
pass
|
||||
@@ -1,5 +0,0 @@
|
||||
import b
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
b = B()
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<architecture>
|
||||
<patternMode>regex</patternMode>
|
||||
<group name="G1" groupRule="layered">
|
||||
<unit name="G2" filePattern="${source_location}.*/a.py" />
|
||||
<unit name="G3" filePattern="${source_location}.*/b.py" />
|
||||
<unit name="G4" filePattern="${source_location}.*/c.py" />
|
||||
</group>
|
||||
<disallow originContainers="G2" targetContainers="G3" />
|
||||
</architecture>
|
||||
@@ -1 +0,0 @@
|
||||
| a.py:1:1:1:8 | Import | $@ imports $@. This violates the "private" group rule on "G5", which disallows dependencies from "G2" to "G5. | a.py:0:0:0:0 | Module a | a | b.py:0:0:0:0 | Module b | b |
|
||||
@@ -1 +0,0 @@
|
||||
Architect/ForbiddenDependency.ql
|
||||
@@ -1,4 +0,0 @@
|
||||
import b
|
||||
|
||||
class A(B):
|
||||
pass
|
||||
@@ -1,4 +0,0 @@
|
||||
import c
|
||||
|
||||
class B(C):
|
||||
pass
|
||||
@@ -1,5 +0,0 @@
|
||||
import b
|
||||
|
||||
class C:
|
||||
def foo(self):
|
||||
b = B()
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<architecture>
|
||||
<patternMode>regex</patternMode>
|
||||
<group name="G1" groupRule="unrestricted">
|
||||
<!-- G2 to G3 dependency should not be allowed, because G2 is not a sibling of G5 -->
|
||||
<unit name="G2" filePattern="${source_location}.*/a.py" />
|
||||
<group name="G5" groupRule="unrestricted">
|
||||
<group name="G5" groupRule="private">
|
||||
<unit name="G3" filePattern="${source_location}.*/b.py" />
|
||||
</group>
|
||||
<!-- G4 to G3 dependency should be allowed, because G4 and G5 are siblings -->
|
||||
<unit name="G4" filePattern="${source_location}.*/c.py" />
|
||||
</group>
|
||||
</group>
|
||||
</architecture>
|
||||
Reference in New Issue
Block a user