From de381c1deb9800f57450b11f47176cb804f8642d Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 15 Dec 2020 22:03:10 +0100 Subject: [PATCH 1/5] add basic .Net build and test GHA workflow --- .github/workflows/build-dotnet.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-dotnet.yml diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml new file mode 100644 index 0000000..348ce94 --- /dev/null +++ b/.github/workflows/build-dotnet.yml @@ -0,0 +1,32 @@ +name: Test Build Plugin + +on: + push: + branches: [ master ] + paths-ignore: + - "**/*.md" + pull_request: + branches: [ master ] + paths-ignore: + - "**/*.md" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: "Setup .NET Core" + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "5.0.x" + + - name: "Install dependencies" + run: dotnet restore + + - name: "Build" + run: dotnet build --configuration Release + + - name: "Test" + run: dotnet test --no-restore --verbosity normal + From dd205ce9664fed2bc830768347b8bad5c6aaf8fc Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 15 Dec 2020 22:03:34 +0100 Subject: [PATCH 2/5] add CodeQL GHA workflow --- .github/workflows/codeql-analysis.yml | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..ab44309 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,65 @@ +name: Run CodeQL + +on: + push: + branches: [ master ] + paths-ignore: + - '**/*.md' + pull_request: + branches: [ master ] + paths-ignore: + - '**/*.md' + schedule: + - cron: '24 2 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + queries: +security-and-quality + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + From a2ca9b07b280bdf2eb6641bc705d6d4fda7adb18 Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 15 Dec 2020 22:03:48 +0100 Subject: [PATCH 3/5] add dependabot config --- .github/dependabot.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..982bc1a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +version: 2 +updates: + # Fetch and update latest `nuget` pkgs + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "daily" + time: "00:00" + open-pull-requests-limit: 10 + commit-message: + prefix: "chore" + include: "scope" + + # Fetch and update latest `github-actions` pkgs + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + time: "00:00" + labels: + - "skip-changelog" + open-pull-requests-limit: 10 + commit-message: + prefix: "ci" + include: "scope" + From cf254672c2bb4d10b503cacdc9260fc98279b611 Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 15 Dec 2020 22:20:18 +0100 Subject: [PATCH 4/5] update .editorconfig with main repo version slight edit for max_line_length (due to inconsistent off support) --- .editorconfig | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.editorconfig b/.editorconfig index 6e17172..b87ad18 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,7 +14,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true end_of_line = lf -max_line_length = null +max_line_length = 9999 # YAML indentation [*.{yml,yaml}] @@ -54,8 +54,8 @@ dotnet_style_explicit_tuple_names = true:suggestion dotnet_style_null_propagation = true:suggestion dotnet_style_coalesce_expression = true:suggestion dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent -dotnet_prefer_inferred_tuple_names = true:suggestion -dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_auto_properties = true:silent dotnet_style_prefer_conditional_expression_over_assignment = true:silent dotnet_style_prefer_conditional_expression_over_return = true:silent @@ -72,7 +72,7 @@ dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected dotnet_naming_symbols.non_private_static_fields.required_modifiers = static dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case @@ -197,11 +197,3 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false # Wrapping preferences csharp_preserve_single_line_statements = true csharp_preserve_single_line_blocks = true - -############################### -# VB Coding Conventions # -############################### - -[*.vb] -# Modifier preferences -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:suggestion From 0c0e58ea8eab7d17e74e6b3a2dfe3c359842081f Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sat, 9 Jan 2021 17:37:45 +0100 Subject: [PATCH 5/5] address review comments --- .github/workflows/build-dotnet.yml | 5 ----- .github/workflows/codeql-analysis.yml | 25 ------------------------- 2 files changed, 30 deletions(-) diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml index 348ce94..1395b38 100644 --- a/.github/workflows/build-dotnet.yml +++ b/.github/workflows/build-dotnet.yml @@ -3,12 +3,8 @@ name: Test Build Plugin on: push: branches: [ master ] - paths-ignore: - - "**/*.md" pull_request: branches: [ master ] - paths-ignore: - - "**/*.md" jobs: build: @@ -29,4 +25,3 @@ jobs: - name: "Test" run: dotnet test --no-restore --verbosity normal - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ab44309..c6ee551 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,12 +3,8 @@ name: Run CodeQL on: push: branches: [ master ] - paths-ignore: - - '**/*.md' pull_request: branches: [ master ] - paths-ignore: - - '**/*.md' schedule: - cron: '24 2 * * 4' @@ -21,9 +17,6 @@ jobs: fail-fast: false matrix: language: [ 'csharp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository @@ -34,32 +27,14 @@ jobs: with: dotnet-version: 5.0.x - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main queries: +security-and-quality - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 -