Skip to content

Commit 61e7457

Browse files
committed
Merge remote-tracking branch 'origin/main' into bp/FixIssue2117
# Conflicts: # src/ImageSharp/PixelFormats/PixelImplementations/Bgra32.cs
2 parents 353f2e2 + 7b40389 commit 61e7457

File tree

1,957 files changed

+210050
-214850
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,957 files changed

+210050
-214850
lines changed

.editorconfig

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 2.1.0 (Using https://semver.org/)
2-
# Updated: 2021-03-03
1+
# Version: 4.1.1 (Using https://semver.org/)
2+
# Updated: 2022-05-23
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.
@@ -49,11 +49,11 @@ indent_size = 2
4949
indent_size = 2
5050

5151
# Markdown Files
52-
[*.md]
52+
[*.{md,mdx}]
5353
trim_trailing_whitespace = false
5454

5555
# Web Files
56-
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
56+
[*.{htm,html,js,jsm,ts,tsx,cjs,cts,ctsx,mjs,mts,mtsx,css,sass,scss,less,pcss,svg,vue}]
5757
indent_size = 2
5858

5959
# Batch Files
@@ -75,7 +75,7 @@ indent_style = tab
7575

7676
[*.{cs,csx,cake,vb,vbx}]
7777
# Default Severity for all .NET Code Style rules below
78-
dotnet_analyzer_diagnostic.category-style.severity = warning
78+
dotnet_analyzer_diagnostic.severity = warning
7979

8080
##########################################
8181
# Language Rules
@@ -128,14 +128,15 @@ file_header_template = Copyright (c) Six Labors.\nLicensed under the Six Labors
128128
# dotnet_diagnostic.SA1636.severity = none
129129

130130
# Undocumented
131-
dotnet_style_operator_placement_when_wrapping = end_of_line
131+
dotnet_style_operator_placement_when_wrapping = end_of_line:warning
132+
csharp_style_prefer_null_check_over_type_check = true:warning
132133

133134
# C# Style Rules
134135
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
135136
[*.{cs,csx,cake}]
136137
# 'var' preferences
137-
csharp_style_var_for_built_in_types = never
138-
csharp_style_var_when_type_is_apparent = true:warning
138+
csharp_style_var_for_built_in_types = false:warning
139+
csharp_style_var_when_type_is_apparent = false:warning
139140
csharp_style_var_elsewhere = false:warning
140141
# Expression-bodied members
141142
csharp_style_expression_bodied_methods = true:warning
@@ -200,12 +201,15 @@ dotnet_diagnostic.IDE0059.severity = suggestion
200201
# Organize using directives
201202
dotnet_sort_system_directives_first = true
202203
dotnet_separate_import_directive_groups = false
204+
# Dotnet namespace options
205+
dotnet_style_namespace_match_folder = true:suggestion
206+
dotnet_diagnostic.IDE0130.severity = suggestion
203207

204208
# C# formatting rules
205209
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
206210
[*.{cs,csx,cake}]
207211
# Newline options
208-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
212+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#new-line-options
209213
csharp_new_line_before_open_brace = all
210214
csharp_new_line_before_else = true
211215
csharp_new_line_before_catch = true
@@ -214,15 +218,15 @@ csharp_new_line_before_members_in_object_initializers = true
214218
csharp_new_line_before_members_in_anonymous_types = true
215219
csharp_new_line_between_query_expression_clauses = true
216220
# Indentation options
217-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#indentation-options
221+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#indentation-options
218222
csharp_indent_case_contents = true
219223
csharp_indent_switch_labels = true
220224
csharp_indent_labels = no_change
221225
csharp_indent_block_contents = true
222226
csharp_indent_braces = false
223227
csharp_indent_case_contents_when_block = false
224228
# Spacing options
225-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#spacing-options
229+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#spacing-options
226230
csharp_space_after_cast = false
227231
csharp_space_after_keywords_in_control_flow_statements = true
228232
csharp_space_between_parentheses = false
@@ -246,9 +250,12 @@ csharp_space_before_open_square_brackets = false
246250
csharp_space_between_empty_square_brackets = false
247251
csharp_space_between_square_brackets = false
248252
# Wrap options
249-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options
253+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#wrap-options
250254
csharp_preserve_single_line_statements = false
251255
csharp_preserve_single_line_blocks = true
256+
# Namespace options
257+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#namespace-options
258+
csharp_style_namespace_declarations = file_scoped:warning
252259

253260
##########################################
254261
# .NET Naming Rules

.git-blame-ignore-revs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# file-scoped namespaces and global usings
2+
5528a2923ccc63d776c91994b0b17a2c3ad5be94
3+
d14c82023fc01a6fca99c42212cb3c97991fae9e
4+
0e9a066195a100ae56b4ca49cee9927fb15e1482

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@ jobs:
2121
runtime: -x64
2222
codecov: false
2323
# Temp disabled due to runtime preview issues.
24+
# https://github.com/SixLabors/ImageSharp/issues/2117
2425
#- os: macos-latest
2526
# framework: net7.0
2627
# sdk: 7.0.x
2728
# sdk-preview: true
2829
# runtime: -x64
2930
# codecov: false
30-
- os: windows-latest
31-
framework: net7.0
32-
sdk: 7.0.x
33-
sdk-preview: true
34-
runtime: -x64
35-
codecov: false
31+
#- os: windows-latest
32+
# framework: net7.0
33+
# sdk: 7.0.x
34+
# sdk-preview: true
35+
# runtime: -x64
36+
# codecov: false
3637
- os: ubuntu-latest
3738
framework: net6.0
3839
sdk: 6.0.x

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ To clone ImageSharp locally, click the "Clone in [YOUR_OS]" button above or run
7777
git clone https://github.com/SixLabors/ImageSharp
7878
```
7979

80+
Then set the following config to ensure blame commands ignore mass reformatting commits.
81+
82+
```bash
83+
git config blame.ignoreRevsFile .git-blame-ignore-revs
84+
```
85+
8086
If working with Windows please ensure that you have enabled long file paths in git (run as Administrator).
8187

8288
```bash

SixLabors.ImageSharp.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<!--Add common namespaces to implicit global usings if enabled.-->
5+
<ItemGroup Condition="'$(ImplicitUsings)'=='enable' OR '$(ImplicitUsings)'=='true'">
6+
<Using Include="SixLabors.ImageSharp" />
7+
<Using Include="SixLabors.ImageSharp.PixelFormats" />
8+
<Using Include="SixLabors.ImageSharp.Processing" />
9+
</ItemGroup>
10+
11+
</Project>

src/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2222
</PropertyGroup>
2323

24+
<PropertyGroup>
25+
<CodeAnalysisRuleSet>..\ImageSharp.ruleset</CodeAnalysisRuleSet>
26+
</PropertyGroup>
27+
2428
<ItemGroup>
2529
<!-- DynamicProxyGenAssembly2 is needed so Moq can use our internals -->
2630
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />

src/ImageSharp.ruleset

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name="ImageSharp" ToolsVersion="17.0">
3+
<Include Path="..\shared-infrastructure\sixlabors.ruleset" Action="Default" />
4+
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
5+
<Rule Id="SA1011" Action="None" />
6+
</Rules>
7+
</RuleSet>

0 commit comments

Comments
 (0)