-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP3CheckBear checks mp3 files for consistency and print several errors and warnings. Closes: #1519
- Loading branch information
1 parent
18febd5
commit a80ed8d
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ addons: | |
- opam | ||
- php-codesniffer | ||
- verilator | ||
- mp3check | ||
|
||
cache: | ||
pip: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from coalib.bearlib.abstractions.Linter import linter | ||
from coalib.results.Result import Result | ||
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY | ||
from dependency_management.requirements.DistributionRequirement import ( | ||
DistributionRequirement) | ||
|
||
|
||
@linter(executable='mp3check') | ||
class MP3CheckBear: | ||
""" | ||
Report possible security weaknesses for MP3 files. | ||
For more information, | ||
consult <https://code.google.com/archive/p/mp3check/>. | ||
""" | ||
LANGUAGES = {'MP3'} | ||
REQUIREMENTS = {DistributionRequirement(apt_get='mp3check')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
LICENSE = 'AGPL-3.0' | ||
|
||
@staticmethod | ||
def create_arguments(filename, file, config_file): | ||
return ('-ase', filename) | ||
|
||
def process_output(self, output, filename, file): | ||
lines = output.split('\n') | ||
lines = (i for i in lines) | ||
for msg in lines: | ||
yield Result.from_values(origin=self, | ||
message=msg, | ||
file=filename, | ||
severity=RESULT_SEVERITY.MAJOR) |
Empty file.