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

build(deps-dev): bump credo from 1.7.1 to 1.7.2 #2339

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 25, 2023

Bumps credo from 1.7.1 to 1.7.2.

Changelog

Sourced from credo's changelog.

1.7.2

  • Fix compatibility & compiler warnings with Elixir 1.16
  • Fix a bottleneck in multicore performance
  • Cache scope priorities
  • CHANGELOG.md is now included in the package
  • Credo.Check.Readability.NestedFunctionCalls no longer warns on function calls in interpolated strings
  • Credo.Check.Readability.PredicateFunctionNames fixed false positives
  • Credo.Check.Readability.RedundantBlankLines fixed a bug with double quotes multiline strings
  • Credo.Check.Refactor.ModuleDependencies now takes modules for :excluded_namespaces parameter
  • Credo.Check.Refactor.NegatedIsNil no longer leaks memory
  • Credo.Check.Warning.Dbg now warns when part of a pipeline and called without parens
  • Credo.Check.Warning.MissedMetadataKeyInLoggerConfig received various fixes and improvements
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Dec 25, 2023
@dependabot dependabot bot requested a review from a team as a code owner December 29, 2023 16:12
Copy link

Coverage of commit 37da3be

Summary coverage rate:
  lines......: 94.6% (3030 of 3202 lines)
  functions..: 72.9% (1236 of 1696 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/realtime/block_waiver.ex                                    | 100%     33| 100%    13|    -      0
  lib/realtime/ghost.ex                                           |89.1%     64| 100%     5|    -      0
  lib/realtime/server.ex                                          | 100%    143| 100%    49|    -      0
  lib/realtime/timepoint_status.ex                                |96.5%     57| 100%     9|    -      0
  lib/schedule/block.ex                                           |98.1%     54| 100%    15|    -      0
  lib/schedule/data.ex                                            |97.5%    163|95.2%    42|    -      0
  lib/schedule/gtfs/stop.ex                                       | 100%     32|92.9%    14|    -      0
  lib/schedule/gtfs/stop_time.ex                                  | 100%     14| 100%     6|    -      0
  lib/schedule/piece.ex                                           | 100%      5| 100%     5|    -      0
  lib/schedule/run.ex                                             | 100%      9| 100%     5|    -      0
  lib/schedule/trip.ex                                            |98.1%     52|92.3%    13|    -      0
  lib/skate/settings/user.ex                                      | 100%     15| 100%     8|    -      0
  lib/skate_web/channels/vehicle_channel.ex                       | 100%     26|80.0%    10|    -      0
  lib/skate_web/channels/vehicles_channel.ex                      |94.6%     37|81.8%    11|    -      0
  lib/skate_web/channels/vehicles_search_channel.ex               |92.9%     28| 100%    12|    -      0

Download coverage report

Comment on lines 77 to 79
@spec for_now?(t(), Util.Time.time_of_day()) :: boolean()
def for_now?(piece, now_time_of_day) do
piece.start_time <= now_time_of_day and piece.end_time > now_time_of_day
Copy link
Member

Choose a reason for hiding this comment

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

suggestion+nit(non-blocking): what if we renamed this to active? or active_at_time??
Or if we wanted to match how block_waiver.ex does it, current??

I'd do this in a refactor PR, but I'm curious what y'all think.

cc: @mbta/skate-developers

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@spec for_now?(t(), Util.Time.time_of_day()) :: boolean()
def for_now?(piece, now_time_of_day) do
piece.start_time <= now_time_of_day and piece.end_time > now_time_of_day
@spec active_at_time?(t(), Util.Time.time_of_day()) :: boolean()
def active_at_time?(piece, time_of_day) do
piece.start_time <= time_of_day and time_of_day < piece.end_time

Copy link
Member

Choose a reason for hiding this comment

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

I kind of like current rather than active, since these represent scheduled service that may or may not actually be active in the sense of having a vehicle running them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just renamed it to current?

@joshlarson joshlarson force-pushed the dependabot/hex/credo-1.7.2 branch from 37da3be to 93d6944 Compare January 2, 2024 23:16
Copy link

github-actions bot commented Jan 3, 2024

Coverage of commit c2786c2

Summary coverage rate:
  lines......: 94.6% (3048 of 3222 lines)
  functions..: 73.0% (1244 of 1704 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/realtime/block_waiver.ex                                    | 100%     33| 100%    13|    -      0
  lib/realtime/ghost.ex                                           |89.1%     64| 100%     5|    -      0
  lib/realtime/server.ex                                          | 100%    143| 100%    49|    -      0
  lib/realtime/timepoint_status.ex                                |96.5%     57| 100%     9|    -      0
  lib/schedule/block.ex                                           |98.1%     54| 100%    15|    -      0
  lib/schedule/data.ex                                            |97.5%    163|95.2%    42|    -      0
  lib/schedule/gtfs/stop.ex                                       | 100%     32|92.9%    14|    -      0
  lib/schedule/gtfs/stop_time.ex                                  | 100%     14| 100%     6|    -      0
  lib/schedule/piece.ex                                           | 100%      5| 100%     5|    -      0
  lib/schedule/run.ex                                             | 100%      9| 100%     5|    -      0
  lib/schedule/trip.ex                                            |98.1%     52|92.3%    13|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0
  lib/skate_web/channels/vehicle_channel.ex                       | 100%     26|80.0%    10|    -      0
  lib/skate_web/channels/vehicles_channel.ex                      |94.6%     37|81.8%    11|    -      0
  lib/skate_web/channels/vehicles_search_channel.ex               |92.9%     28| 100%    12|    -      0

Download coverage report

@joshlarson
Copy link
Contributor

Not a huge deal, but before merging this... I noticed that at least one of the functions that I renamed here didn't seem to have any callers, and I kind of want to do another pass just to see if we can clean up some dead code while we're here.

Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 8, 2024

A newer version of credo exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@firestack firestack requested review from firestack and a team and removed request for firestack January 8, 2024 14:16
@spec is_active(t(), Util.Time.time_of_day(), Util.Time.time_of_day()) :: boolean()
def is_active(trip, start_time_of_day, end_time_of_day) do
@spec active?(t(), Util.Time.time_of_day(), Util.Time.time_of_day()) :: boolean()
def active?(trip, start_time_of_day, end_time_of_day) do
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this one might not be called anywhere - renaming it yielded no compilation errors.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -75,7 +75,7 @@ defmodule Skate.Settings.User do
Skate.Repo.all(from(u in users_for_route_ids_query(route_ids), select: u.id))
end

def is_in_test_group(user_id, test_group_name) do
def in_test_group?(user_id, test_group_name) do
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is also dead code (it's only invoked in tests).

That's true as of removing the old search maps code, because I know we were using this to surface some data conditional on a user being in one or the other test group.

I'm on the fence about keeping it though, because it's not exactly dead code - just sleeping - and we will probably wake it up again during detour drawing. We could also use the all_test_group_names function to get the same information, and it would be better to only have this logic in one place.

Copy link
Contributor

Choose a reason for hiding this comment

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

dependabot bot and others added 4 commits January 10, 2024 09:57
Bumps [credo](https://github.com/rrrene/credo) from 1.7.1 to 1.7.2.
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/commits)

---
updated-dependencies:
- dependency-name: credo
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@joshlarson joshlarson force-pushed the dependabot/hex/credo-1.7.2 branch from c2786c2 to 6809a33 Compare January 10, 2024 15:50
Copy link

Coverage of commit 6809a33

Summary coverage rate:
  lines......: 94.5% (3016 of 3191 lines)
  functions..: 72.9% (1239 of 1700 functions)
  branches...: no data found

Files changed coverage rate:
                                                                  |Lines       |Functions  |Branches    
  Filename                                                        |Rate     Num|Rate    Num|Rate     Num
  ======================================================================================================
  lib/realtime/block_waiver.ex                                    | 100%     33| 100%    13|    -      0
  lib/realtime/ghost.ex                                           |89.1%     64| 100%     5|    -      0
  lib/realtime/server.ex                                          |99.2%    132|97.8%    45|    -      0
  lib/realtime/timepoint_status.ex                                |96.5%     57| 100%     9|    -      0
  lib/schedule/block.ex                                           |98.1%     54| 100%    15|    -      0
  lib/schedule/data.ex                                            |97.5%    163|95.2%    42|    -      0
  lib/schedule/gtfs/stop.ex                                       | 100%     32|92.9%    14|    -      0
  lib/schedule/gtfs/stop_time.ex                                  | 100%     14| 100%     6|    -      0
  lib/schedule/piece.ex                                           | 100%      5| 100%     5|    -      0
  lib/schedule/run.ex                                             | 100%      9| 100%     5|    -      0
  lib/schedule/trip.ex                                            |98.1%     52|92.3%    13|    -      0
  lib/skate/settings/user.ex                                      | 100%     19| 100%     9|    -      0

Download coverage report

@joshlarson joshlarson merged commit ef0b19f into main Jan 10, 2024
9 checks passed
@joshlarson joshlarson deleted the dependabot/hex/credo-1.7.2 branch January 10, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants