Skip to content

Commit

Permalink
set ColumnLImit to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Mar 3, 2024
1 parent 48cb71d commit d04f6da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
]
},
url="https://github.com/cs50/style50",
version="2.10.1",
version="2.10.2",
include_package_data=True,
)
6 changes: 3 additions & 3 deletions style50/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class C(StyleCheck):
extensions = ["c", "h", "cpp", "hpp"]
magic_names = [] # Only recognize C files by their extension

styleConfig = '{ AllowShortFunctionsOnASingleLine: Empty, BraceWrapping: { AfterCaseLabel: true, AfterControlStatement: true, AfterFunction: true, AfterStruct: true, BeforeElse: true, BeforeWhile: true }, BreakBeforeBraces: Custom, ColumnLimit: 132, IndentCaseLabels: true, IndentWidth: 4, SpaceAfterCStyleCast: true, TabWidth: 4 }'
styleConfig = '{ AllowShortFunctionsOnASingleLine: Empty, BraceWrapping: { AfterCaseLabel: true, AfterControlStatement: true, AfterFunction: true, AfterStruct: true, BeforeElse: true, BeforeWhile: true }, BreakBeforeBraces: Custom, ColumnLimit: 100, IndentCaseLabels: true, IndentWidth: 4, SpaceAfterCStyleCast: true, TabWidth: 4 }'
clangFormat = [
"clang-format", f"-style={styleConfig}"
]
Expand Down Expand Up @@ -68,7 +68,7 @@ def count_lines(self, code):

# TODO: Determine which options (if any) should be passed to autopep8
def style(self, code):
return autopep8.fix_code(code, options={"max_line_length": 132, "ignore_local_config": True})
return autopep8.fix_code(code, options={"max_line_length": 100, "ignore_local_config": True})


class Js(C):
Expand All @@ -91,7 +91,7 @@ def style(self, code):
opts = jsbeautifier.default_options()
opts.end_with_newline = True
opts.operator_position = "preserve-newline"
opts.wrap_line_length = 132
opts.wrap_line_length = 100
opts.brace_style = "collapse,preserve-inline"
opts.keep_array_indentation = True
return jsbeautifier.beautify(code, opts)
Expand Down

0 comments on commit d04f6da

Please sign in to comment.