Skip to content

Commit

Permalink
MP3CheckBear: Add MP3CheckBear
Browse files Browse the repository at this point in the history
MP3CheckBear checks mp3 files for consistency and print
several errors and warnings.

Closes: #1519
  • Loading branch information
shreyans800755 committed Mar 25, 2017
1 parent 63d31e1 commit 3486e6a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ esac
# apt-get commands
export DEBIAN_FRONTEND=noninteractive

deps="libclang1-3.4 indent mono-mcs chktex r-base julia golang-go luarocks verilator cppcheck flawfinder devscripts"
deps="libclang1-3.4 indent mono-mcs chktex r-base julia golang-go luarocks verilator cppcheck flawfinder devscripts mp3check"
deps_infer="m4 opam"

case $CIRCLE_BUILD_IMAGE in
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ addons:
- opam
- php-codesniffer
- verilator
- mp3check

cache:
pip: true
Expand Down
1 change: 1 addition & 0 deletions bear-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ vim-vint~=0.3.10
vulture~=0.10.0
yamllint~=1.6.1
yapf~=0.14.0
mp3check~=0.8.3-2
23 changes: 23 additions & 0 deletions bears/mp3/MP3CheckBear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from coalib.bearlib.abstractions.Linter import linter
from dependency_management.requirements.DistributionRequirement import (
DistributionRequirement)


@linter(executable='mp3chek',
output_format='regex',
output_regex=r'L(?P<line>\d+)C(?P<column>\d+): (?P<message>.*)')
class MP3CheckBear:
"""
Report possible security weaknesses for MP3 files.
For more information,
consult <https://code.google.com/archive/p/mp3check/>.
"""

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):
pass

0 comments on commit 3486e6a

Please sign in to comment.