diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 031b8d4..041e8eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -193,7 +193,7 @@ jobs: name: coverage - name: SonarQube Scan - uses: SonarSource/sonarqube-scan-action@v5 + uses: SonarSource/sonarqube-scan-action@v7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8af552d..300aeb1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -51,7 +51,7 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/draft_release.yml b/.github/workflows/draft_release.yml index a735cfe..e3bd37f 100644 --- a/.github/workflows/draft_release.yml +++ b/.github/workflows/draft_release.yml @@ -30,7 +30,7 @@ jobs: python3 -m mdformat CHANGELOG.md - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v5 + uses: stefanzweifel/git-auto-commit-action@v7 id: make-commit with: branch: release/${{ github.event.inputs.tag }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e25a99..04bf9b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,14 +51,14 @@ repos: - id: yamllint - repo: https://github.com/asottile/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs args: [-S, -l, '120'] additional_dependencies: [black==22.12.0] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.9 + rev: v0.14.10 hooks: - id: ruff-format name: ruff (format) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb23bb..a0bba04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,14 +25,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update GitHub Action `actions/download-artifact` to v4 - Update GitHub Action `actions/upload-artifact` to v4 - Update GitHub Action `codecov/codecov-action` from v4 to v5 -- Use GitHub Action `SonarSource/sonarqube-scan-action` v5 +- Use GitHub Action `SonarSource/sonarqube-scan-action` v7 +- Update GitHub Action `github/codeql-action` from v3 to v4 +- Update GitHub Action `stefanzweifel/git-auto-commit-action` from v5 to v7 - Update `github.com/pre-commit/pre-commit-hooks` hook to v6.0.0 - Update `https://github.com/PyCQA/doc8/` hook to v2.0.0 - Update `github.com/codespell-project/codespell` hook to v2.4.1 - Update `github.com/shellcheck-py/shellcheck-py` hook to v0.11.0.1 - Update `github.com/adrienverge/yamllint.git` hook to v1.37.1 -- Update `github.com/asottile/blacken-docs` hook to 1.19.1 -- Update `github.com/astral-sh/ruff-pre-commit` hook to v0.12.9 +- Update `github.com/asottile/blacken-docs` hook to 1.20.0 +- Update `github.com/astral-sh/ruff-pre-commit` hook to v0.14.10 ## [v1.9.6] - 2024-06-02 diff --git a/cmake_pc_hooks/_argparse.py b/cmake_pc_hooks/_argparse.py index 6a2f5ec..7cf2312 100644 --- a/cmake_pc_hooks/_argparse.py +++ b/cmake_pc_hooks/_argparse.py @@ -145,11 +145,11 @@ def _load_data_from_toml( except FileNotFoundError as err: if path_must_exist: raise TOMLFileNotFoundError(path) from err - log.debug('TOML file %s does not exist (not an error)', str(path)) + log.debug('TOML file %s does not exist (not an error)', path) except KeyError as err: if section_must_exist: raise TOMLSectionKeyError(section, path) from err - log.debug('TOML file %s does not have a %s section (not an error)', str(path), section) + log.debug('TOML file %s does not have a %s section (not an error)', path, section) else: return config return {} diff --git a/cmake_pc_hooks/_cmake.py b/cmake_pc_hooks/_cmake.py index 15946d0..7d0e553 100644 --- a/cmake_pc_hooks/_cmake.py +++ b/cmake_pc_hooks/_cmake.py @@ -271,7 +271,7 @@ def resolve_build_directory(self, build_dir_list=None, *, automatic_discovery=Tr if build_dir.exists() and Path(build_dir, 'CMakeCache.txt').exists(): log.debug( 'Located valid build directory with CMakeCache.txt at: %s', - str(build_dir), + build_dir, ) self.build_dir = build_dir.resolve() return @@ -280,7 +280,7 @@ def resolve_build_directory(self, build_dir_list=None, *, automatic_discovery=Tr if automatic_discovery: for path in sorted(self.source_dir.glob('*')): if path.is_dir() and (path / 'CMakeCache.txt').exists(): - log.info('Automatic build dir discovery resulted in: %s', str(path)) + log.info('Automatic build dir discovery resulted in: %s', path) self.build_dir = path return @@ -295,7 +295,7 @@ def resolve_build_directory(self, build_dir_list=None, *, automatic_discovery=Tr self.build_dir = Path(build_dir_list[0]).resolve() log.info( 'Unable to locate a valid build directory. Will be creating one at %s', - str(self.build_dir), + self.build_dir, ) def setup_cmake_args(self, cmake_args): # noqa: C901 @@ -532,8 +532,8 @@ def _is_relevant_configure_file_call(json_data): configured_file = self.build_dir / configured_file log.debug( 'detected call to configure_file(%s %s [...])', - str(input_file), - str(configured_file), + input_file, + configured_file, ) self.cmake_configured_files.append(str(configured_file)) diff --git a/cmake_pc_hooks/_utils.py b/cmake_pc_hooks/_utils.py index 1dbd289..c42fe86 100644 --- a/cmake_pc_hooks/_utils.py +++ b/cmake_pc_hooks/_utils.py @@ -173,7 +173,7 @@ def _resolve_compilation_database(cmake_build_dir: Path, build_dir_list: list[Pa for build_dir in build_dir_list: path = Path(build_dir, 'compile_commands.json') if build_dir.exists() and path.exists(): - log.debug('Located valid compilation database at: %s', str(path)) + log.debug('Located valid compilation database at: %s', path) return path log.debug('No valid compilation database located') return None