Skip to content

Commit c9d6e31

Browse files
Merge pull request #164 from SixLabors/js/branding
Update branding and CI build
2 parents fa18357 + 4d16cbb commit c9d6e31

File tree

4 files changed

+107
-67
lines changed

4 files changed

+107
-67
lines changed

.editorconfig

Lines changed: 79 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 1.6.2 (Using https://semver.org/)
2-
# Updated: 2020-11-02
1+
# Version: 2.1.0 (Using https://semver.org/)
2+
# Updated: 2021-03-03
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -60,87 +60,84 @@ indent_size = 2
6060
[*.{cmd,bat}]
6161
end_of_line = crlf
6262

63+
# Bash Files
64+
[*.sh]
65+
end_of_line = lf
66+
6367
# Makefiles
6468
[Makefile]
6569
indent_style = tab
6670

6771
##########################################
68-
# File Header (Uncomment to support file headers)
69-
# https://docs.microsoft.com/visualstudio/ide/reference/add-file-header
72+
# Default .NET Code Style Severities
73+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
7074
##########################################
7175

72-
# [*.{cs,csx,cake,vb,vbx,tt,ttinclude}]
73-
file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
74-
75-
# SA1636: File header copyright text should match
76-
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
77-
# dotnet_diagnostic.SA1636.severity = none
76+
[*.{cs,csx,cake,vb,vbx}]
77+
# Default Severity for all .NET Code Style rules below
78+
dotnet_analyzer_diagnostic.severity = warning
7879

7980
##########################################
80-
# .NET Language Conventions
81-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
81+
# Language Rules
82+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules
8283
##########################################
8384

84-
# .NET Code Style Settings
85-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
85+
# .NET Style Rules
86+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#net-style-rules
8687
[*.{cs,csx,cake,vb,vbx}]
8788
# "this." and "Me." qualifiers
88-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
8989
dotnet_style_qualification_for_field = true:warning
9090
dotnet_style_qualification_for_property = true:warning
9191
dotnet_style_qualification_for_method = true:warning
9292
dotnet_style_qualification_for_event = true:warning
9393
# Language keywords instead of framework type names for type references
94-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords
9594
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
9695
dotnet_style_predefined_type_for_member_access = true:warning
9796
# Modifier preferences
98-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
9997
dotnet_style_require_accessibility_modifiers = always:warning
10098
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
10199
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
102100
dotnet_style_readonly_field = true:warning
103101
# Parentheses preferences
104-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences
105102
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
106103
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
107104
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
108-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
105+
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggestion
109106
# Expression-level preferences
110-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
111107
dotnet_style_object_initializer = true:warning
112108
dotnet_style_collection_initializer = true:warning
113109
dotnet_style_explicit_tuple_names = true:warning
114110
dotnet_style_prefer_inferred_tuple_names = true:warning
115111
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
116112
dotnet_style_prefer_auto_properties = true:warning
117-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
118113
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
114+
dotnet_diagnostic.IDE0045.severity = suggestion
119115
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
116+
dotnet_diagnostic.IDE0046.severity = suggestion
120117
dotnet_style_prefer_compound_assignment = true:warning
118+
dotnet_style_prefer_simplified_interpolation = true:warning
119+
dotnet_style_prefer_simplified_boolean_expressions = true:warning
121120
# Null-checking preferences
122-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences
123121
dotnet_style_coalesce_expression = true:warning
124122
dotnet_style_null_propagation = true:warning
125-
# Parameter preferences
126-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences
127-
dotnet_code_quality_unused_parameters = all:warning
128-
# More style options (Undocumented)
129-
# https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641
123+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
124+
# File header preferences
125+
file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
126+
# SA1636: File header copyright text should match
127+
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
128+
# dotnet_diagnostic.SA1636.severity = none
129+
130+
# Undocumented
130131
dotnet_style_operator_placement_when_wrapping = end_of_line
131-
# https://github.com/dotnet/roslyn/pull/40070
132-
dotnet_style_prefer_simplified_interpolation = true:warning
133132

134-
# C# Code Style Settings
135-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
133+
# C# Style Rules
134+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
136135
[*.{cs,csx,cake}]
137-
# Implicit and explicit types
138-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
136+
# 'var' preferences
139137
csharp_style_var_for_built_in_types = never
140138
csharp_style_var_when_type_is_apparent = true:warning
141139
csharp_style_var_elsewhere = false:warning
142140
# Expression-bodied members
143-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members
144141
csharp_style_expression_bodied_methods = true:warning
145142
csharp_style_expression_bodied_constructors = true:warning
146143
csharp_style_expression_bodied_operators = true:warning
@@ -149,47 +146,64 @@ csharp_style_expression_bodied_indexers = true:warning
149146
csharp_style_expression_bodied_accessors = true:warning
150147
csharp_style_expression_bodied_lambdas = true:warning
151148
csharp_style_expression_bodied_local_functions = true:warning
152-
# Pattern matching
153-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching
149+
# Pattern matching preferences
154150
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
155151
csharp_style_pattern_matching_over_as_with_null_check = true:warning
156-
# Inlined variable declarations
157-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations
158-
csharp_style_inlined_variable_declaration = true:warning
152+
csharp_style_prefer_switch_expression = true:warning
153+
csharp_style_prefer_pattern_matching = true:warning
154+
csharp_style_prefer_not_pattern = true:warning
159155
# Expression-level preferences
160-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
156+
csharp_style_inlined_variable_declaration = true:warning
161157
csharp_prefer_simple_default_expression = true:warning
158+
csharp_style_pattern_local_over_anonymous_function = true:warning
159+
csharp_style_deconstructed_variable_declaration = true:warning
160+
csharp_style_prefer_index_operator = true:warning
161+
csharp_style_prefer_range_operator = true:warning
162+
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
162163
# "Null" checking preferences
163-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences
164164
csharp_style_throw_expression = true:warning
165165
csharp_style_conditional_delegate_call = true:warning
166166
# Code block preferences
167-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences
168167
csharp_prefer_braces = true:warning
169-
# Unused value preferences
170-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences
171-
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
172-
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
173-
# Index and range preferences
174-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
175-
csharp_style_prefer_index_operator = true:warning
176-
csharp_style_prefer_range_operator = true:warning
177-
# Miscellaneous preferences
178-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
179-
csharp_style_deconstructed_variable_declaration = true:warning
180-
csharp_style_pattern_local_over_anonymous_function = true:warning
168+
csharp_prefer_simple_using_statement = true:suggestion
169+
dotnet_diagnostic.IDE0063.severity = suggestion
170+
# 'using' directive preferences
181171
csharp_using_directive_placement = outside_namespace:warning
172+
# Modifier preferences
182173
csharp_prefer_static_local_function = true:warning
183-
csharp_prefer_simple_using_statement = true:suggestion
184174

185175
##########################################
186-
# .NET Formatting Conventions
187-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions
176+
# Unnecessary Code Rules
177+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/unnecessary-code-rules
188178
##########################################
189179

190-
# Organize usings
191-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#organize-using-directives
180+
# .NET Unnecessary code rules
181+
[*.{cs,csx,cake,vb,vbx}]
182+
dotnet_code_quality_unused_parameters = all:warning
183+
dotnet_remove_unnecessary_suppression_exclusions = none:warning
184+
185+
# C# Unnecessary code rules
186+
[*.{cs,csx,cake}]
187+
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
188+
dotnet_diagnostic.IDE0058.severity = suggestion
189+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
190+
dotnet_diagnostic.IDE0059.severity = suggestion
191+
192+
##########################################
193+
# Formatting Rules
194+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules
195+
##########################################
196+
197+
# .NET formatting rules
198+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#net-formatting-rules
199+
[*.{cs,csx,cake,vb,vbx}]
200+
# Organize using directives
192201
dotnet_sort_system_directives_first = true
202+
dotnet_separate_import_directive_groups = false
203+
204+
# C# formatting rules
205+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
206+
[*.{cs,csx,cake}]
193207
# Newline options
194208
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
195209
csharp_new_line_before_open_brace = all
@@ -231,14 +245,14 @@ csharp_space_around_declaration_statements = false
231245
csharp_space_before_open_square_brackets = false
232246
csharp_space_between_empty_square_brackets = false
233247
csharp_space_between_square_brackets = false
234-
# Wrapping options
248+
# Wrap options
235249
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options
236250
csharp_preserve_single_line_statements = false
237251
csharp_preserve_single_line_blocks = true
238252

239253
##########################################
240-
# .NET Naming Conventions
241-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-naming-conventions
254+
# .NET Naming Rules
255+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules
242256
##########################################
243257

244258
[*.{cs,csx,cake,vb,vbx}]
@@ -261,8 +275,9 @@ dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_
261275
dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
262276
# disallowed_style - Anything that has this style applied is marked as disallowed
263277
dotnet_naming_style.disallowed_style.capitalization = pascal_case
264-
dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
265-
dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
278+
# Disabled while we investigate compatibility with VS 16.10
279+
#dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
280+
#dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
266281
# internal_error_style - This style should never occur... if it does, it indicates a bug in file or in the parser using the file
267282
dotnet_naming_style.internal_error_style.capitalization = pascal_case
268283
dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
*.dll binary
8787
*.eot binary
8888
*.exe binary
89-
*.ktx binary
9089
*.otf binary
9190
*.pbm binary
9291
*.pdf binary
@@ -125,3 +124,5 @@
125124
*.tga filter=lfs diff=lfs merge=lfs -text
126125
*.webp filter=lfs diff=lfs merge=lfs -text
127126
*.dds filter=lfs diff=lfs merge=lfs -text
127+
*.ktx filter=lfs diff=lfs merge=lfs -text
128+
*.ktx2 filter=lfs diff=lfs merge=lfs -text

.github/workflows/build-and-test.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ jobs:
3838
steps:
3939
- uses: actions/checkout@v2
4040

41+
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
42+
- name: Create LFS file list
43+
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
44+
45+
- name: Restore LFS cache
46+
uses: actions/cache@v2
47+
id: lfs-cache
48+
with:
49+
path: .git/lfs
50+
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
51+
52+
- name: Git LFS Pull
53+
run: git lfs pull
54+
4155
- name: Install NuGet
4256
uses: NuGet/setup-nuget@v1
4357

@@ -63,15 +77,25 @@ jobs:
6377
npm install -g azurite
6478
azurite --loose &
6579
80+
- name: Setup NuGet Cache
81+
uses: actions/cache@v2
82+
id: nuget-cache
83+
with:
84+
path: ~/.nuget
85+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
86+
restore-keys: ${{ runner.os }}-nuget-
87+
6688
- name: Build
6789
shell: pwsh
6890
run: ./ci-build.ps1 "${{matrix.options.framework}}"
91+
env:
92+
SIXLABORS_TESTING: True
6993

7094
- name: Test
7195
shell: pwsh
7296
run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
7397
env:
74-
CI: True
98+
SIXLABORS_TESTING: True
7599
XUNIT_PATH: .\tests\ImageSharp.Web.Tests # Required for xunit
76100

77101
- name: Update Codecov

0 commit comments

Comments
 (0)