Changeset View
Changeset View
Standalone View
Standalone View
build/coala/AStyleBear.py
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
from coalib.bearlib.abstractions.Linter import linter | |||||
from dependency_management.requirements.DistributionRequirement import ( | |||||
DistributionRequirement) | |||||
@linter(executable='astyle', | |||||
output_format='corrected') | |||||
class AStyleBear: | |||||
""" | |||||
Artistic Style is a source code indenter, formatter, | |||||
and beautifier for the C, C++, C++/CLI, Objective-C, | |||||
C# and Java programming languages. | |||||
""" | |||||
LANGUAGES = {'C', 'CPP', 'Objective-C', 'C#', 'Java'} | |||||
REQUIREMENTS = {DistributionRequirement('astyle')} | |||||
AUTHORS = {'Nicolas Auvray'} | |||||
LICENSE = 'GPL-2.0' | |||||
CAN_FIX = {'Formatting'} | |||||
SEE_MORE = 'http://astyle.sourceforge.net/astyle.html' | |||||
@staticmethod | |||||
def create_arguments(filename, file, config_file, | |||||
astyle_config: str = '', | |||||
): | |||||
""" | |||||
:param astyle_config: | |||||
The location of the astylerc config file. | |||||
""" | |||||
args = ('--stdin='+filename,) | |||||
if astyle_config: | |||||
args += ('--options='+astyle_config,) | |||||
return args |
Wildfire Games · Phabricator