Skip to content

Commit

Permalink
Fix megalinter errors and warnings (mega-linter-runner --fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ringler committed Jul 18, 2024
1 parent e95f807 commit 8df96c7
Show file tree
Hide file tree
Showing 170 changed files with 2,238 additions and 1,625 deletions.
130 changes: 65 additions & 65 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,75 @@
name: "🕷️ Bug report"
description: Create a report to help us improve
labels:
- bug
- bug
body:
- type: dropdown
id: toolaffected
attributes:
label: Which tool is affected?
description: CZI Shrink is the GUI application while CZI Compress refers to the CLI tool.
multiple: false
options:
- CZI Compress
- CZI Shrink
validations:
required: true
- type: dropdown
id: toolaffected
attributes:
label: Which tool is affected?
description: CZI Shrink is the GUI application while CZI Compress refers to the CLI tool.
multiple: false
options:
- CZI Compress
- CZI Shrink
validations:
required: true

- type: textarea
attributes:
label: Description
description: Describe the bug and add screenshots if possible/applicable.
placeholder: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Description
description: Describe the bug and add screenshots if possible/applicable.
placeholder: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Please include screenshots (if applicable) and relevant logs.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Please include screenshots (if applicable) and relevant logs.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: dropdown
attributes:
label: OS
description: What operating system are you using?
multiple: false
options:
- Windows
- MacOS
- Linux
validations:
required: true
- type: dropdown
attributes:
label: OS
description: What operating system are you using?
multiple: false
options:
- Windows
- MacOS
- Linux
validations:
required: true

- type: input
attributes:
label: OS Version
description: What version and flavor (if applicable) of your OS are you using?
placeholder: Ubuntu 23.10 | Sonoma 14.1.2 | Windows 11 23H2
validations:
required: true
- type: input
attributes:
label: OS Version
description: What version and flavor (if applicable) of your OS are you using?
placeholder: Ubuntu 23.10 | Sonoma 14.1.2 | Windows 11 23H2
validations:
required: true

- type: textarea
attributes:
label: Other Context
description: Please add any other context that may be relevant.
validations:
required: false
- type: textarea
attributes:
label: Other Context
description: Please add any other context that may be relevant.
validations:
required: false
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# STOP - Read this First!
# STOP - Read this First
Reporting a security vulnerability?
Check out the project's [security policy](https://github.com/zeiss/czicompress/security/policy).

Expand All @@ -24,7 +24,7 @@ Fixes # (issue)
Describe the tests that you ran to verify your changes.
Provide instructions to reproduce.

## Checklist:
## Checklist

- [ ] I followed the Contributing Guidelines.
- [ ] I did a self-review.
Expand Down
24 changes: 12 additions & 12 deletions .github/actions/cmake-build/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: 'CMake-Build'
description: 'Install Dependencies + Configure CMake + Build'
name: "CMake-Build"
description: "Install Dependencies + Configure CMake + Build"
inputs:
path-cache:
description: 'Path to vcpkg cache directory'
description: "Path to vcpkg cache directory"
required: true
path-toolchain:
description: 'Path to vcpkg tool chain file'
description: "Path to vcpkg tool chain file"
required: true
os-id:
description: 'Operating System Identifier'
description: "Operating System Identifier"
required: true
build-type:
description: 'Build Configuration'
description: "Build Configuration"
required: true
package:
description: 'Using package manager for external dependencies'
description: "Using package manager for external dependencies"
required: true
platform:
description: 'OS platform'
description: "OS platform"
required: true
src-dir:
description: 'The directory with the sources'
description: "The directory with the sources"
required: true
runs:
using: "composite"
Expand All @@ -44,9 +44,9 @@ runs:
shell: bash
working-directory: ${{inputs.src-dir}}
run: |
# We install the following packages: eigen3, catch2, cli11. Installing them with vcpkg (and caching them)
# is faster than downloading and building them from source (which is the default behavior of the CZICompress-build-system).
vcpkg install --triplet ${{inputs.platform}} eigen3 catch2 cli11
# We install the following packages: eigen3, catch2, cli11. Installing them with vcpkg (and caching them)
# is faster than downloading and building them from source (which is the default behavior of the CZICompress-build-system).
vcpkg install --triplet ${{inputs.platform}} eigen3 catch2 cli11
- name: Configure CMake
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/advanced-issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
policy:
- section:
- id: [toolaffected]
block-list: ['None', 'Other']
block-list: ["None", "Other"]
label:
- name: czicompress
keys: ['CZI Compress']
- name: 'czishrink'
keys: ['CZI Shrink']
keys: ["CZI Compress"]
- name: "czishrink"
keys: ["CZI Shrink"]
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ component_management:
paths:
- "czishrink/"
comment:
layout: "header, diff, flags, components" # show component info in the PR comment
layout: "header, diff, flags, components" # show component info in the PR comment

Check warning on line 40 in .github/codecov.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

40:45 [comments] too few spaces before comment
68 changes: 38 additions & 30 deletions .github/workflows/czicompress_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CMake Build (czicompress)

on:
push:
branches: ["main"] # run only when merge with main branch
branches: ["main"] # run only when merge with main branch

Check warning on line 6 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

6:24 [comments] too few spaces before comment
pull_request:
branches: ["main"] # run only when merge with main branch
branches: ["main"] # run only when merge with main branch

Check warning on line 8 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

8:24 [comments] too few spaces before comment
workflow_dispatch: {}

permissions:
Expand All @@ -26,33 +26,41 @@ jobs:
fail-fast: false
matrix:
build: [Release, Debug]
config: # Create matrix with combinations of compiler and options.
config: # Create matrix with combinations of compiler and options.

Check warning on line 29 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

29:17 [comments] too few spaces before comment
# Notes:
# The property 'package' is controlling whether the build-time-dependencies (i.e. eigen3, cli11, catch2) are pulled in via the system's package manager or via CMake at build-time.
- {
name: windows-64-msvc-package-on,
os: windows-latest,
platform: x64-windows-static,
package: ON,
path-cache: '${{ github.workspace }}\vcpkg\installed',
path-toolchain: 'C:/vcpkg/scripts/buildsystems/vcpkg.cmake',
os-id: 'windows',
}
name: windows-64-msvc-package-on,

Check failure on line 33 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

33:15 [indentation] wrong indentation: expected 12 but found 14
os: windows-latest,

Check failure on line 34 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

34:15 [indentation] wrong indentation: expected 12 but found 14
platform: x64-windows-static,

Check failure on line 35 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

35:15 [indentation] wrong indentation: expected 12 but found 14
package: ON,

Check failure on line 36 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

36:15 [indentation] wrong indentation: expected 12 but found 14
path-cache: '${{ github.workspace }}\vcpkg\installed',

Check failure on line 37 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

37:15 [indentation] wrong indentation: expected 12 but found 14
path-toolchain: "C:/vcpkg/scripts/buildsystems/vcpkg.cmake",

Check failure on line 38 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

38:15 [indentation] wrong indentation: expected 12 but found 14
os-id: "windows",

Check failure on line 39 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

39:15 [indentation] wrong indentation: expected 12 but found 14
}

Check failure on line 40 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

40:13 [indentation] wrong indentation: expected 10 but found 12
- {
name: ubuntu-package-off,
os: ubuntu-20.04, # we want to use an older version in order to increase likelihood that binaries work on other distros
platform: x64-linux,
package: OFF,
path-cache: '/usr/local/share/vcpkg/installed',
path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake',
os-id: 'linux',
}
name: ubuntu-package-off,

Check failure on line 42 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

42:15 [indentation] wrong indentation: expected 12 but found 14
os: ubuntu-20.04, # we want to use an older version in order to increase likelihood that binaries work on other distros

Check failure on line 43 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

43:15 [indentation] wrong indentation: expected 12 but found 14

Check warning on line 43 in .github/workflows/czicompress_cmake.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

43:33 [comments] too few spaces before comment
platform: x64-linux,
package: OFF,
path-cache: "/usr/local/share/vcpkg/installed",
path-toolchain: "/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake",
os-id: "linux",
}
exclude:
# From https://github.com/actions/runner/issues/1512
- build: Debug
config: {name: ubuntu-package-off, os: ubuntu-20.04, platform: x64-linux, package: OFF, path-cache: '/usr/local/share/vcpkg/installed', path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake', os-id: 'linux'}
config:
{
name: ubuntu-package-off,
os: ubuntu-20.04,
platform: x64-linux,
package: OFF,
path-cache: "/usr/local/share/vcpkg/installed",
path-toolchain: "/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake",
os-id: "linux",
}
steps:

- name: Checkout the source codes.
uses: actions/checkout@v4

Expand All @@ -64,7 +72,7 @@ jobs:
build-type: ${{matrix.build}}
package: ${{matrix.config.package}}
platform: ${{matrix.config.platform}}
src-dir: '${{github.workspace}}/czicompress'
src-dir: "${{github.workspace}}/czicompress"

- name: Run unit tests
working-directory: ${{github.workspace}}/czicompress/build
Expand All @@ -77,8 +85,8 @@ jobs:
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.build == 'Debug') }}
shell: pwsh
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> $env:GITHUB_PATH
- name: Get Coverage
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.build == 'Debug') }}
Expand All @@ -100,23 +108,23 @@ jobs:
if: matrix.build == 'Release'
shell: bash
run: |
set -e
mkdir ./czicompress-${{env.name}}
cp -R ./THIRD_PARTY_LICENSES_ARTIFACT_DISTRIBUTION.txt ./czicompress-${{env.name}}/
cp -R ./build/app/THIRD_PARTY_LICENSES.txt ./czicompress-${{env.name}}/
set -e
mkdir ./czicompress-${{env.name}}
cp -R ./THIRD_PARTY_LICENSES_ARTIFACT_DISTRIBUTION.txt ./czicompress-${{env.name}}/
cp -R ./build/app/THIRD_PARTY_LICENSES.txt ./czicompress-${{env.name}}/
# gather the binaries
- name: Prepare Linux binaries
if: ${{ (matrix.config.os == 'ubuntu-20.04') && (matrix.build == 'Release') }}
shell: bash
run: |
cp ./build/app/czicompress ./build/capi/libczicompressc.so ./czicompress-${{env.name}}/
cp ./build/app/czicompress ./build/capi/libczicompressc.so ./czicompress-${{env.name}}/
- name: Prepare Windows binaries
if: ${{ (matrix.config.os == 'windows-latest') && (matrix.build == 'Release') }}
shell: bash
run: |
cp ./build/app/${{matrix.build}}/*.exe ./build/capi/${{matrix.build}}/libczicompressc.dll ./czicompress-${{env.name}}/
cp ./build/app/${{matrix.build}}/*.exe ./build/capi/${{matrix.build}}/libczicompressc.dll ./czicompress-${{env.name}}/
# upload the build-results to artifacts-store
- name: Upload artifacts
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/czicompress_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ jobs:

- uses: ./.github/actions/cmake-build
with:
path-cache: '/usr/local/share/vcpkg/installed'
path-toolchain: '/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake'
os-id: 'linux'
path-cache: "/usr/local/share/vcpkg/installed"
path-toolchain: "/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake"
os-id: "linux"
build-type: Release
package: ON
platform: x64-linux
src-dir: '${{github.workspace}}/czicompress'
src-dir: "${{github.workspace}}/czicompress"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/czishrink_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '30 2 * * 2'
- cron: "30 2 * * 2"
workflow_dispatch: {}

permissions: read-all
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-czishrink-nuget-${{ hashFiles('czishrink/**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-czishrink-nuget-
${{ runner.os }}-czishrink-nuget-
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
Loading

0 comments on commit 8df96c7

Please sign in to comment.