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

Add a new RuboCop for alphabetizing zap trash array elements #16365

Merged
merged 19 commits into from
Jan 24, 2024

Commits on Dec 19, 2023

  1. Add a new RuboCop for alphabetizing zap trash array elements

    - Part of issue 16323.
    - Previously this was being done manually by Cask maintainers.
    - While we're here, enforce that the `zap trash` path is not in `[]` if
      it only contains a single element.
    - This is buggy on actual Casks, hence the draft PR.
    issyl0 committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8cf58e3 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2023

  1. Configuration menu
    Copy the full SHA
    73b3ace View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2023

  1. Ignore zap trash stanzas with interpolation

    - Interpolating the version into a path is a common pattern, but the interpolations
      trip up the alphabetization autocorrect quite spectacularly, so let's
      ignore them (for now?).
    issyl0 committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    f4754ba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f34accf View commit details
    Browse the repository at this point in the history
  3. Better detection and replacement of non-alphabetized arrays

    - Use `sort_by` to sort the array, rather than comparing each element
      to the next.
    - This doesn't error with complaints about clobbering at all when run on
      `homebrew/cask`, hurray. And it also handles interpolations correctly,
      rather than ignoring them.
    
    Co-authored-by: Bevan Kay <email@bevankay.me>
    issyl0 and bevanjkay committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    b9f13fc View commit details
    Browse the repository at this point in the history
  4. Ignore non-zap trash methods

    issyl0 committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    fb124f9 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. Configuration menu
    Copy the full SHA
    9070f6d View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2024

  1. Appease RuboCop

    issyl0 committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    6a1cb62 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    338e30f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c9e6e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e4b4af4 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Configuration menu
    Copy the full SHA
    dae9b0c View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2024

  1. Configuration menu
    Copy the full SHA
    779f1bb View commit details
    Browse the repository at this point in the history
  2. Double quotes not single

    issyl0 committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    e9bcb64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eec7a96 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2024

  1. Remove the single-element array in everything.json used for Cask tests

    ```
      1) Cask::Cask#to_h when loaded from cask file returns expected hash
         Failure/Error: expect(JSON.pretty_generate(hash)).to eq(expected_json)
    
    Diff:
           @@ -28,9 +28,7 @@
                  "uninstall": [
                    {
                      "launchctl": "com.every.thing.agent",
           -          "delete": [
           -            "/Library/EverythingHelperTools"
           -          ],
           +          "delete": "/Library/EverythingHelperTools",
                      "kext": "com.every.thing.driver",
                      "signal": [
                        [
           @@ -103,7 +101,7 @@
              ],
              "ruby_source_path": "Casks/everything.rb",
              "ruby_source_checksum": {
           -    "sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
           +    "sha256": "0c4af571cce1632fc6a3dcf3e75ba82a3283077ef12399428192c26f9d6f779b"
              }
            }
         # ./test/cask/cask_spec.rb:225:in `block (4 levels) in <top (required)>'
         # ./test/support/helper/spec/shared_context/homebrew_cask.rb:53:in `block (2 levels) in <top (required)>'
    ```
    issyl0 committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    8910d5a View commit details
    Browse the repository at this point in the history
  2. Move multi-line comments with the code they're 'attached' to

    Co-authored-by: Bevan J. Kay <email@bevankay.me>
    issyl0 and bevanjkay committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    458844a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d5f9eef View commit details
    Browse the repository at this point in the history
  4. Treat zap and uninstall the same

    - Since `zap` can have more than just `trash`.
    issyl0 committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    693a27d View commit details
    Browse the repository at this point in the history