Skip to content

Commit

Permalink
Remove unused functions (semgrep#3149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager authored May 19, 2021
1 parent d8c1f81 commit 4fe3a2f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions semgrep/semgrep/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,26 +269,6 @@ def severity(self) -> str:
def mode(self) -> str:
return self._mode

@property
def sarif_severity(self) -> str:
"""
SARIF v2.1.0-compliant severity string.
See https://github.com/oasis-tcs/sarif-spec/blob/a6473580/Schemata/sarif-schema-2.1.0.json#L1566
"""
mapping = {"INFO": "note", "ERROR": "error", "WARNING": "warning"}
return mapping[self.severity]

@property
def sarif_tags(self) -> Iterator[str]:
"""
Tags to display on SARIF-compliant UIs, such as GitHub security scans.
"""
if "cwe" in self.metadata:
yield self.metadata["cwe"]
if "owasp" in self.metadata:
yield f"OWASP-{self.metadata['owasp']}"

@property
def languages(self) -> List[Language]:
return self._languages
Expand Down

0 comments on commit 4fe3a2f

Please sign in to comment.