Skip to content

Commit f603fd9

Browse files
committed
Add GitHub Action and .editorconfig code style
1 parent c11ab0b commit f603fd9

24 files changed

+3408
-3268
lines changed

.editorconfig

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
root = true
2+
3+
[*.{fx,fxh,hlsl,hlsli}]
4+
indent_size = 4
5+
indent_style = space
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
end_of_line = crlf
9+
charset = latin1
10+
cpp_space_before_function_open_parenthesis = remove
11+
cpp_space_around_binary_operator = ignore
12+
cpp_space_pointer_reference_alignment = ignore
13+
14+
[*.{cpp,h,hpp,inl}]
15+
indent_size = 4
16+
indent_style = space
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
end_of_line = crlf
20+
charset = latin1
21+
cpp_indent_braces = false
22+
cpp_indent_multi_line_relative_to = innermost_parenthesis
23+
cpp_indent_within_parentheses = indent
24+
cpp_indent_preserve_within_parentheses = false
25+
cpp_indent_case_contents = true
26+
cpp_indent_case_labels = false
27+
cpp_indent_case_contents_when_block = true
28+
cpp_indent_lambda_braces_when_parameter = true
29+
cpp_indent_preprocessor = one_left
30+
cpp_indent_access_specifiers = false
31+
cpp_indent_namespace_contents = true
32+
cpp_indent_preserve_comments = true
33+
cpp_new_line_before_open_brace_namespace = new_line
34+
cpp_new_line_before_open_brace_type = new_line
35+
cpp_new_line_before_open_brace_function = new_line
36+
cpp_new_line_before_open_brace_block = new_line
37+
cpp_new_line_before_open_brace_lambda = new_line
38+
cpp_new_line_scope_braces_on_separate_lines = true
39+
cpp_new_line_close_brace_same_line_empty_type = true
40+
cpp_new_line_close_brace_same_line_empty_function = true
41+
cpp_new_line_before_catch = true
42+
cpp_new_line_before_else = true
43+
cpp_new_line_before_while_in_do_while = true
44+
cpp_space_before_function_open_parenthesis = remove
45+
cpp_space_within_parameter_list_parentheses = false
46+
cpp_space_between_empty_parameter_list_parentheses = false
47+
cpp_space_after_keywords_in_control_flow_statements = true
48+
cpp_space_within_control_flow_statement_parentheses = false
49+
cpp_space_before_lambda_open_parenthesis = false
50+
cpp_space_within_cast_parentheses = false
51+
cpp_space_after_cast_close_parenthesis = false
52+
cpp_space_within_expression_parentheses = false
53+
cpp_space_before_initializer_list_open_brace = false
54+
cpp_space_within_initializer_list_braces = true
55+
cpp_space_before_open_square_bracket = false
56+
cpp_space_within_square_brackets = false
57+
cpp_space_before_empty_square_brackets = false
58+
cpp_space_between_empty_square_brackets = false
59+
cpp_space_group_square_brackets = true
60+
cpp_space_within_lambda_brackets = false
61+
cpp_space_between_empty_lambda_brackets = false
62+
cpp_space_before_comma = false
63+
cpp_space_after_comma = true
64+
cpp_space_remove_around_member_operators = true
65+
cpp_space_before_inheritance_colon = true
66+
cpp_space_before_constructor_colon = true
67+
cpp_space_remove_before_semicolon = true
68+
cpp_space_after_semicolon = false
69+
cpp_space_remove_around_unary_operator = false
70+
cpp_space_around_binary_operator = ignore
71+
cpp_space_around_assignment_operator = insert
72+
cpp_space_pointer_reference_alignment = ignore
73+
cpp_space_around_ternary_operator = insert
74+
cpp_wrap_preserve_blocks = one_liners

.github/workflows/lint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
#
4+
# http://go.microsoft.com/fwlink/?LinkID=615560
5+
6+
name: Code-style cleanup
7+
8+
on:
9+
push:
10+
branches-ignore: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
paths-ignore:
14+
- '*.md'
15+
- LICENSE
16+
- '.azuredevops/**'
17+
- '.nuget/*'
18+
- build/*.ps1
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
analyze:
25+
permissions:
26+
contents: read
27+
security-events: write
28+
actions: read
29+
name: Lint
30+
runs-on: windows-latest
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
36+
- name: Lint Code Base
37+
uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # v7
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }
40+
VALIDATE_ALL_CODEBASE: false
41+
DEFAULT_BRANCH: main
42+
EDITORCONFIG_FILE_NAME: .editorconfig

0 commit comments

Comments
 (0)