Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #175

Closed
wants to merge 6 commits into from
Closed

Release #175

wants to merge 6 commits into from

Conversation

FortiShield
Copy link

@FortiShield FortiShield commented Sep 24, 2024

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I checked that all workflows return a success.
  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
    I added the Fix #ISSUE_NUMBER or Close #ISSUE_NUMBER text to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.
  • Add the pull request to a milestone, eventually creating one, that matches
    with the version that release-please proposes in the preview-release-notes CI job.

Summary by Sourcery

Refactor the Awesome-linter to improve logging, configuration validation, and output management. Introduce new features for GitHub Actions log markers and commitlint configuration validation. Enhance the build and CI processes with new checks and tests, and update documentation to reflect these changes.

New Features:

  • Introduce support for configuring GitHub Actions log markers, allowing users to enable or disable group titles and step summaries.
  • Add support for saving Awesome-linter output and summary to custom paths, enhancing flexibility in output management.
  • Implement a new feature to validate commitlint configuration, providing feedback if the configuration is missing or incorrect.

Bug Fixes:

  • Fix an issue where the linter would fail if the workspace was not a Git repository by adding validation for the GitHub workspace.
  • Resolve a problem with the initialization of GitHub SHA references, ensuring proper validation and error handling.

Enhancements:

  • Refactor the logging system to improve clarity and control over log levels, including the introduction of new log level variables.
  • Enhance the linter's ability to handle different file types by introducing new functions for file type detection and validation.
  • Improve the handling of SSL certificates by adding detailed logging and error handling during certificate installation.

Build:

  • Update the Makefile to include new targets for testing and building, improving the build process and test coverage.
  • Add a new Docker build check to ensure the integrity of the build process for both the main and development container images.

CI:

  • Update the CI workflow to include a new job for previewing release notes using release-please, enhancing the release process.
  • Modify the CI configuration to run tests with different Git-related flags, improving test coverage and reliability.

Deployment:

  • Add a new dev-container configuration for local development, providing a consistent development environment with necessary dependencies.

Documentation:

  • Update documentation to reflect changes in environment variables and configuration options, ensuring users have accurate information.

Tests:

  • Introduce new test cases for various configurations, including non-default workspaces, custom SSL certificates, and Git initial commits.
  • Add tests for the new logging system and GitHub Actions log markers, ensuring these features work as expected.

Chores:

  • Remove deprecated variables and update the codebase to use new configuration options, maintaining code quality and consistency.

Copy link

sourcery-ai bot commented Sep 24, 2024

Reviewer's Guide by Sourcery

This pull request implements a major refactoring of the Awesome-Linter project, focusing on improving code organization, enhancing functionality, and updating dependencies. The changes include restructuring the codebase, introducing new features, and modifying existing components to improve performance and maintainability.

File-Level Changes

Change Details Files
Refactored the main linter script (lib/linter.sh) for improved modularity and efficiency
  • Removed unused variables and functions
  • Introduced parallel processing for linting tasks
  • Improved error handling and logging
  • Added support for new linting options and configurations
lib/linter.sh
Updated and reorganized linter functions and utilities
  • Refactored buildFileList function for better performance
  • Updated validation functions for improved error checking
  • Introduced new helper functions for GitHub-related operations
  • Reorganized linter command definitions and options
lib/functions/buildFileList.sh
lib/functions/detectFiles.sh
lib/functions/validation.sh
lib/functions/updateSSL.sh
lib/functions/setupSSH.sh
lib/functions/worker.sh
lib/functions/linterCommands.sh
lib/functions/githubEvent.sh
lib/functions/githubDomain.sh
lib/functions/output.sh
Introduced new configuration files and updated existing ones
  • Added new linter configuration files
  • Updated existing linter rules and settings
  • Introduced Prettier configuration for consistent code formatting
.github/linters/.jscpd.json
.github/linters/.gitleaks-ignore-tests.toml
.github/linters/.hadolint.yaml
.github/linters/.checkov-test-linters-failure.yaml
.github/linters/.jscpd-test-linters.json
.github/linters/.powershell-psscriptanalyzer.psd1
.github/linters/.markdown-lint.yml
prettier.config.js
Updated project dependencies and build configurations
  • Updated Ruby gems in Gemfile
  • Added new PHP Composer dependencies
  • Modified Python build script for improved dependency management
ci-tools/Gemfile
ci-tools/composer/composer.json
ci-tools/python/build-venvs.sh
Refactored GitHub Actions workflows and configurations
  • Updated Dependabot configuration
  • Modified CI workflow
  • Updated pull request template
.github/dependabot.yml
.github/workflows/ci.yml
.github/pull_request-template.md
Introduced new global variables and constants
  • Added new language definitions
  • Introduced linter rule configurations
  • Defined linter command options
lib/globals/languages.sh
lib/globals/linterRules.sh
lib/globals/linterCommandsOptions.sh
Removed deprecated or unused files and functions
  • Removed linterVersions.sh
  • Deleted experimental batch worker scripts
lib/functions/linterVersions.sh
lib/functions/experimental-batch-workers/base.sh
lib/functions/experimental-batch-workers/gitleaks.sh
lib/functions/experimental-batch-workers/README.md
lib/functions/experimental-batch-workers/cfn-lint.sh
lib/functions/experimental-batch-workers/eslint.sh

Sequence Diagram

sequenceDiagram
    participant User
    participant Awesome-Linter
    participant Parallel
    participant Linters
    User->>Awesome-Linter: Run linter
    Awesome-Linter->>Awesome-Linter: Initialize environment
    Awesome-Linter->>Awesome-Linter: Build file list
    Awesome-Linter->>Parallel: Process files in parallel
    loop For each language
        Parallel->>Linters: Run specific linter
        Linters-->>Parallel: Return results
    end
    Parallel-->>Awesome-Linter: Aggregate results
    Awesome-Linter->>Awesome-Linter: Generate summary
    Awesome-Linter-->>User: Return linting results
Loading

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @FortiShield - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Excellent refactoring work that improves code organization, maintainability, and performance. The modularization of functions and parallel processing for linters are particularly noteworthy improvements.
  • Consider adding more comprehensive documentation for the new configuration options and environment variables introduced in this refactoring, especially for the fix mode features.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

lib/functions/buildFileList.sh Show resolved Hide resolved
@NxPKG NxPKG added enhancement New feature or request good first issue Good for newcomers github_actions Pull requests that update GitHub Actions code labels Sep 24, 2024
Copy link

github-actions bot commented Jan 1, 2025

This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this pull request should stay open, please remove the O: stale 🤖 label or comment on the pull request.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code good first issue Good for newcomers O: stale 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants