Skip to content

Commit

Permalink
chore: copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Farenheith committed Nov 28, 2024
0 parents commit 5f14ad5
Show file tree
Hide file tree
Showing 39 changed files with 2,593 additions and 0 deletions.
188 changes: 188 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]

# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = false
charset = utf-8-bom
dotnet_analyzer_diagnostic.category-Style.severity = error
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = true
# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_readonly_field = true
# Expression-level preferences
dotnet_style_object_initializer = true
dotnet_style_collection_initializer = true
dotnet_style_explicit_tuple_names = true
dotnet_style_null_propagation = true
dotnet_style_coalesce_expression = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_analyzer_diagnostic.category-nullable.severity = error
###############################
# Naming Conventions #
###############################
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_simplified_interpolation = true
dotnet_style_namespace_match_folder = true
dotnet_style_operator_placement_when_wrapping = beginning_of_line
# Define what we will treat as private fields.
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
# Define rule that something must begin with an underscore and be in camel case.
dotnet_naming_style.require_underscore_prefix_and_camel_case.required_prefix = _
dotnet_naming_style.require_underscore_prefix_and_camel_case.capitalization = camel_case
# Appy our rule to private fields.
dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.symbols = private_fields
dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.style = require_underscore_prefix_and_camel_case
dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.severity = error
tab_width = 4
end_of_line = lf
###############################
# C# Coding Conventions #
###############################

# IDE0046: Convert to conditional expression
dotnet_diagnostic.IDE0046.severity = none

[*.cs]
# var preferences
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true
# Expression-bodied members
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = none
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true
csharp_style_expression_bodied_indexers = true
csharp_style_expression_bodied_accessors = true
# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_pattern_matching_over_as_with_null_check = true
# Null-checking preferences
csharp_style_throw_expression = true
csharp_style_conditional_delegate_call = true
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
# Expression-level preferences
csharp_prefer_braces = true
csharp_style_deconstructed_variable_declaration = true
csharp_prefer_simple_default_expression = true
csharp_style_prefer_local_over_anonymous_function = true
csharp_style_inlined_variable_declaration = true
###############################
# C# Formatting Rules #
###############################
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# Space preferences
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true
csharp_style_namespace_declarations = file_scoped:silent
csharp_style_prefer_method_group_conversion = true
csharp_style_prefer_top_level_statements = true
csharp_style_expression_bodied_lambdas = true
csharp_style_expression_bodied_local_functions = false:silent
###############################

# IDE0021: Use block body for constructor
dotnet_diagnostic.IDE0021.severity = none

# IDE0022: Use block body for method
dotnet_diagnostic.IDE0022.severity = none

# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none

# IDE1006: Naming rule violation
dotnet_diagnostic.IDE1006.severity = error

# IDE0010: Add missing cases to switch statement
dotnet_diagnostic.IDE0010.severity = none

#IDE0051: unused private methods, fields, properties, and events
dotnet_diagnostic.IDE0051.severity = error

#IDE0051: unused private methods, fields, properties, and events (entire category of rules)
dotnet_analyzer_diagnostic.category-CodeQuality.severity = error

# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none

dotnet_diagnostic.IDE0005.severity = none

# IDE0039: Use local function
dotnet_diagnostic.IDE0039.severity = none

# IDE0290: Use primary constructor
dotnet_diagnostic.IDE0290.severity = none
31 changes: 31 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @Farenheith @gustavobeavis @danielgalleni @Dodt @pedrosodre @douglasdrdc @fgabrielsilva @pauloandreget

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository.
36 changes: 36 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: Benchmark
on:
workflow_dispatch:

env:
ConnectionStrings__SqlConnection: ${{ secrets.CONNECTIONSTRINGS__SQLCONNECTION }}

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x.x
8.x.x
9.x.x
- name: Prepare Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
run: npm ci

- name: Test
run: npm run benchmark
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is a basic workflow to help you get started with Actions

name: build
on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x.x
8.x.x
9.x.x
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a basic workflow to help you get started with Actions

name: lint
on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x.x
8.x.x
9.x.x
- name: install
run: npm ci
- name: Lint
run: npm run lint
55 changes: 55 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: semantic-release

on:
push:
branches: [main]

env:
ConnectionStrings__SqlConnection: ${{ secrets.CONNECTIONSTRINGS__SQLCONNECTION }}

jobs:
semantic:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
HUSKY: 0
CI: true
steps:
- uses: actions/checkout@v4
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x.x
8.x.x
9.x.x
- name: Prepare Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
run: npm ci
- name: Build
run: npm run build

- name: Test
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov.info
coverageLocations: ${{github.workspace}}/test/Codibre.ConcurrentTaskRunner.Test/coverage/lcov.net9.0.info:lcov

- name: Semantic Release
run: npm i -g @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/git @semantic-release/github @semantic-release/exec @droidsolutions-oss/semantic-release-nuget @semantic-release/release-notes-generator semantic-release @semantic-release/error
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
HUSKY: 0
CI: true
- run: npx semantic-release --ci
- run: git push
Loading

0 comments on commit 5f14ad5

Please sign in to comment.