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

Update detekt to version 1.21.0 #2056

Closed
wants to merge 5 commits into from
Closed

Update detekt to version 1.21.0 #2056

wants to merge 5 commits into from

Conversation

rvandermeulen
Copy link
Contributor

Turns out this upgrades without needing any fix-ups at all 🤘

@rvandermeulen rvandermeulen requested a review from a team as a code owner October 21, 2022 02:56
@rvandermeulen rvandermeulen force-pushed the detekt_update branch 2 times, most recently from 0b04862 to c12643c Compare October 21, 2022 03:27
@rvandermeulen rvandermeulen marked this pull request as draft October 21, 2022 05:13
@rvandermeulen rvandermeulen added the Work In Progress Not ready to land yet. Work in progress (WIP). label Oct 21, 2022
@rvandermeulen
Copy link
Contributor Author

More needs doing here still.

@rvandermeulen
Copy link
Contributor Author

Alright, so the tl;dr of this PR:

  • Updates detekt to 1.21.0. And I figured out how to set the version in Dependencies.kt now too, so that's nice.
  • Aligns the config with Fenix and then pulls in new configuration changes from upstream since Fenix was last updated.
  • Updates the baseline. Notably:
    • Detekt doesn't like the lack of camel-casing in BrowserToolbar.kt. Didn't seem worth fixing, but happy to do so if preferred.
    • I ignored the complaint in SyncedTabsViewHolder.kt because it looked like image was intended to be used in the TODO item further down. Will delete if that's not the case.
  • Fixes some newly-reported errors:
    • Removes unused bindVersion in InstalledAddonDetailsActivity.kt
    • Fixes some UseCheckOrError errors. Not entirely sure if my change to SyncedTabsAdapter.kt was the right one or not, though.

Now I think it's ready for review 😄

@rvandermeulen rvandermeulen marked this pull request as ready for review October 21, 2022 15:22
@rvandermeulen rvandermeulen added 🕵️‍♀️ needs review PRs that need to be reviewed and removed Work In Progress Not ready to land yet. Work in progress (WIP). labels Oct 24, 2022
config/detekt.yml Show resolved Hide resolved
config/detekt.yml Show resolved Hide resolved
config/detekt.yml Show resolved Hide resolved
config/detekt.yml Show resolved Hide resolved
@jonalmeida
Copy link
Collaborator

Aligns the config with Fenix and then pulls in new configuration changes from upstream since Fenix was last updated.

Where is the upstream copy coming from? Did you manually apply it to our config file or was there some tool that generates the new values for us.

There are a lot things which have been turned on, which I wonder if we can just ignore for now, or maybe it's not worth upgrading detekt?

@rvandermeulen
Copy link
Contributor Author

rvandermeulen commented Oct 25, 2022

Aligns the config with Fenix and then pulls in new configuration changes from upstream since Fenix was last updated.

Where is the upstream copy coming from? Did you manually apply it to our config file or was there some tool that generates the new values for us.

There are a lot things which have been turned on, which I wonder if we can just ignore for now, or maybe it's not worth upgrading detekt?

I created default configs for detekt 1.19 and 1.21 and diffed them to see what changes were made to the defaults by upstream.

@rvandermeulen rvandermeulen force-pushed the detekt_update branch 2 times, most recently from ee7fb21 to 77fec26 Compare November 19, 2022 00:38
@rvandermeulen rvandermeulen added the Work In Progress Not ready to land yet. Work in progress (WIP). label Mar 10, 2023
@rvandermeulen
Copy link
Contributor Author

Sitting on this until after mozilla-mobile/firefox-android#292 lands. Will update the PR to v1.22 and the same config options afterwards.

@rvandermeulen
Copy link
Contributor Author

Superseded by #2337

@rvandermeulen rvandermeulen deleted the detekt_update branch May 19, 2023 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Work In Progress Not ready to land yet. Work in progress (WIP).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants