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

[RFC] Migrate from qmlformat to qml_formatter #10929

Merged
merged 3 commits into from
Jan 19, 2023

Commits on Jan 19, 2023

  1. ci(pre-commit): Migrate from qmlformat to qml_formatter

    Although `qml_formatter` is much less mature, we can at least pin a
    specific version via pre-commit. This is especially important since
    `qmlformat` seems to change its formatting rules on every version bump,
    so version incompatibilities between local computer and CI happen very
    often.
    Holzhaus committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    ca79b20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f756b7 View commit details
    Browse the repository at this point in the history
  3. ci(pre-commit): Pin rust version and set minimum pre-commit version

    Mixxx is a C project, and requiring contributors to set up a rust
    installation on their systems just to be able to use `qml_formatter` is
    a bit tedious.
    
    Fortunately, pre-commit 2.21.0+ features support for bootstrapping Rust
    toolchains using rustup, so that no preexisting system install is necessary.
    See pre-commit/pre-commit#2534 for details.
    
    We set pre-commit 2.21.0 as the minimum required version, to prevent
    users that use an older pre-commit version and don't have rust installed
    from running into problems and to inform them that they should update.
    
    If someone uses an pre-commit version < 2.21.0, the following error message
    will be shown:
    
        $ pre-commit run
        An error has occurred: InvalidConfigError:
        ==> File .pre-commit-config.yaml
        ==> At Config()
        ==> At key: minimum_pre_commit_version
        =====> pre-commit version 2.21.0 is required but version 2.20.0 is installed.  Perhaps run `pip install --upgrade pre-commit`.
        Check the log at /home/user/.cache/pre-commit/pre-commit.log
    Holzhaus committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    7ec6d21 View commit details
    Browse the repository at this point in the history