forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lints your Kotlin files. Check code for coding standards and semantical problems. Closes coala#2152 Modified KotlinLintBear.py Further Modified KotlinLintBear.py
- Loading branch information
1 parent
28e4b8f
commit d26e1b7
Showing
1 changed file
with
31 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
|
||
from coalib.bearlib.abstractions.Linter import linter | ||
|
||
|
||
@linter(executable='ktlint', | ||
use_stderr=True, | ||
use_stdout=True) | ||
class KotlinLintBear: | ||
""" | ||
Lints your Kotlin Files. | ||
Check code for coding standards or semantical problems that might lead | ||
to problems in execution of the code. | ||
See https://ktlint.github.io for more info. | ||
""" | ||
LANGUAGES = {'CSS'} | ||
REQUIREMENTS = {'ktlint'} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
LICENSE = 'AGPL-3.0' | ||
CAN_DETECT = {'Formatting', 'Syntax'} | ||
|
||
def process_output(self, output, filename, file): | ||
stdout, stderr = output | ||
dirpath = os.getcwd() | ||
stdout = stdout.replace(dirpath+'\\', '') | ||
print(stdout) | ||
|
||
@staticmethod | ||
def create_arguments(filename, file, config_file): | ||
return('--color', filename) |