From 26fd18dfe6d3a6a0c9839c509ffdaa889c7e8c4d Mon Sep 17 00:00:00 2001 From: Paul Swartz Date: Thu, 28 Dec 2023 12:51:29 -0500 Subject: [PATCH] chore: update code for more recent Credo defaults In particular, `AliasOrder` should have been the default before, but for whatever reason in #167 it was set to `false`. --- .credo.exs | 189 ------------------ lib/concentrate.ex | 6 +- .../remove_uncertain_stop_time_updates.ex | 3 +- .../encoder/gtfs_realtime_helpers_test.exs | 2 +- .../encoder/trip_updates/json_test.exs | 2 +- .../encoder/trip_updates_enhanced_test.exs | 2 +- .../concentrate/encoder/trip_updates_test.exs | 2 +- .../encoder/vehicle_positions_test.exs | 2 +- .../group_filter/cancelled_trip_test.exs | 2 +- .../group_filter/closed_stop_test.exs | 2 +- ...emove_uncertain_stop_time_updates_test.exs | 3 +- .../remove_unneeded_times_test.exs | 2 +- .../scheduled_stop_times_test.exs | 2 +- .../concentrate/group_filter/shuttle_test.exs | 2 +- .../skipped_stop_on_added_trip_test.exs | 2 +- .../vehicle_at_skipped_stop_test.exs | 2 +- .../group_filter/vehicle_past_stop_test.exs | 2 +- .../group_filter/vehicle_stop_match_test.exs | 2 +- test/concentrate/merge_filter_test.exs | 2 +- .../parser/gtfs_realtime_enhanced_test.exs | 10 +- .../concentrate/parser/gtfs_realtime_test.exs | 2 +- test/concentrate/parser/helpers_test.exs | 4 +- .../concentrate/reporter/time_travel_test.exs | 2 +- 23 files changed, 29 insertions(+), 220 deletions(-) delete mode 100644 .credo.exs diff --git a/.credo.exs b/.credo.exs deleted file mode 100644 index f0ba01e3..00000000 --- a/.credo.exs +++ /dev/null @@ -1,189 +0,0 @@ -# This file contains the configuration for Credo and you are probably reading -# this after creating it with `mix credo.gen.config`. -# -# If you find anything wrong or unclear in this file, please report an -# issue on GitHub: https://github.com/rrrene/credo/issues -# -%{ - # - # You can have as many configs as you like in the `configs:` field. - configs: [ - %{ - # - # Run any config using `mix credo -C `. If no config name is given - # "default" is used. - # - name: "default", - # - # These are the files included in the analysis: - files: %{ - # - # You can give explicit globs or simply directories. - # In the latter case `**/*.{ex,exs}` will be used. - # - included: [ - "lib/", - "src/", - "test/", - "web/", - "apps/*/lib/", - "apps/*/src/", - "apps/*/test/", - "apps/*/web/" - ], - excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"] - }, - # - # Load and configure plugins here: - # - plugins: [], - # - # If you create your own checks, you must specify the source files for - # them here, so they can be loaded by Credo before running the analysis. - # - requires: [], - # - # If you want to enforce a style guide and need a more traditional linting - # experience, you can change `strict` to `true` below: - # - strict: true, - # - # To modify the timeout for parsing files, change this value: - # - parse_timeout: 5000, - # - # If you want to use uncolored output by default, you can change `color` - # to `false` below: - # - color: true, - # - # You can customize the parameters of any check by adding a second element - # to the tuple. - # - # To disable a check put `false` as second element: - # - # {Credo.Check.Design.DuplicatedCode, false} - # - checks: [ - # - ## Consistency Checks - # - {Credo.Check.Consistency.ExceptionNames, []}, - {Credo.Check.Consistency.LineEndings, []}, - {Credo.Check.Consistency.ParameterPatternMatching, []}, - {Credo.Check.Consistency.SpaceAroundOperators, []}, - {Credo.Check.Consistency.SpaceInParentheses, []}, - {Credo.Check.Consistency.TabsOrSpaces, []}, - - # - ## Design Checks - # - # You can customize the priority of any check - # Priority values are: `low, normal, high, higher` - # - {Credo.Check.Design.AliasUsage, - [priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 2]}, - # You can also customize the exit_status of each check. - # If you don't want TODO comments to cause `mix credo` to fail, just - # set this value to 0 (zero). - # - {Credo.Check.Design.TagTODO, [exit_status: 2]}, - {Credo.Check.Design.TagFIXME, []}, - - # - ## Readability Checks - # - {Credo.Check.Readability.AliasOrder, false}, - {Credo.Check.Readability.FunctionNames, []}, - {Credo.Check.Readability.LargeNumbers, []}, - {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 100]}, - {Credo.Check.Readability.ModuleAttributeNames, []}, - {Credo.Check.Readability.ModuleDoc, []}, - {Credo.Check.Readability.ModuleNames, []}, - {Credo.Check.Readability.ParenthesesInCondition, []}, - {Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, - {Credo.Check.Readability.PredicateFunctionNames, []}, - {Credo.Check.Readability.PreferImplicitTry, []}, - {Credo.Check.Readability.RedundantBlankLines, []}, - {Credo.Check.Readability.Semicolons, []}, - {Credo.Check.Readability.SpaceAfterCommas, []}, - {Credo.Check.Readability.StringSigils, []}, - {Credo.Check.Readability.TrailingBlankLine, []}, - {Credo.Check.Readability.TrailingWhiteSpace, []}, - {Credo.Check.Readability.UnnecessaryAliasExpansion, []}, - {Credo.Check.Readability.VariableNames, []}, - - # - ## Refactoring Opportunities - # - {Credo.Check.Refactor.CondStatements, []}, - {Credo.Check.Refactor.CyclomaticComplexity, []}, - {Credo.Check.Refactor.FunctionArity, []}, - {Credo.Check.Refactor.LongQuoteBlocks, []}, - # {Credo.Check.Refactor.MapInto, []}, - {Credo.Check.Refactor.MatchInCondition, []}, - {Credo.Check.Refactor.NegatedConditionsInUnless, []}, - {Credo.Check.Refactor.NegatedConditionsWithElse, []}, - {Credo.Check.Refactor.Nesting, []}, - {Credo.Check.Refactor.UnlessWithElse, []}, - {Credo.Check.Refactor.WithClauses, []}, - - # - ## Warnings - # - {Credo.Check.Warning.ApplicationConfigInModuleAttribute, []}, - {Credo.Check.Warning.BoolOperationOnSameValues, []}, - {Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, - {Credo.Check.Warning.IExPry, []}, - {Credo.Check.Warning.IoInspect, []}, - # {Credo.Check.Warning.LazyLogging, []}, - {Credo.Check.Warning.MixEnv, false}, - {Credo.Check.Warning.OperationOnSameValues, []}, - {Credo.Check.Warning.OperationWithConstantResult, []}, - {Credo.Check.Warning.RaiseInsideRescue, []}, - {Credo.Check.Warning.UnusedEnumOperation, []}, - {Credo.Check.Warning.UnusedFileOperation, []}, - {Credo.Check.Warning.UnusedKeywordOperation, []}, - {Credo.Check.Warning.UnusedListOperation, []}, - {Credo.Check.Warning.UnusedPathOperation, []}, - {Credo.Check.Warning.UnusedRegexOperation, []}, - {Credo.Check.Warning.UnusedStringOperation, []}, - {Credo.Check.Warning.UnusedTupleOperation, []}, - {Credo.Check.Warning.UnsafeExec, []}, - - # - # Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`) - - # - # Controversial and experimental checks (opt-in, just replace `false` with `[]`) - # - {Credo.Check.Consistency.MultiAliasImportRequireUse, false}, - {Credo.Check.Consistency.UnusedVariableNames, false}, - {Credo.Check.Design.DuplicatedCode, false}, - {Credo.Check.Readability.AliasAs, false}, - {Credo.Check.Readability.BlockPipe, false}, - {Credo.Check.Readability.ImplTrue, false}, - {Credo.Check.Readability.MultiAlias, false}, - {Credo.Check.Readability.SeparateAliasRequire, false}, - {Credo.Check.Readability.SinglePipe, false}, - {Credo.Check.Readability.Specs, false}, - {Credo.Check.Readability.StrictModuleLayout, false}, - {Credo.Check.Readability.WithCustomTaggedTuple, false}, - {Credo.Check.Refactor.ABCSize, false}, - {Credo.Check.Refactor.AppendSingleItem, false}, - {Credo.Check.Refactor.DoubleBooleanNegation, false}, - {Credo.Check.Refactor.ModuleDependencies, false}, - {Credo.Check.Refactor.NegatedIsNil, false}, - {Credo.Check.Refactor.PipeChainStart, false}, - {Credo.Check.Refactor.VariableRebinding, false}, - {Credo.Check.Warning.LeakyEnvironment, false}, - {Credo.Check.Warning.MapGetUnsafePass, false}, - {Credo.Check.Warning.UnsafeToAtom, false} - - # - # Custom checks can be created using `mix credo.gen.check`. - # - ] - } - ] -} diff --git a/lib/concentrate.ex b/lib/concentrate.ex index 84e60055..4ca83942 100644 --- a/lib/concentrate.ex +++ b/lib/concentrate.ex @@ -146,8 +146,8 @@ defmodule Concentrate do routes: {&is_list/1, & &1}, excluded_routes: {&is_list/1, & &1}, fallback_url: {&is_binary/1, & &1}, - username: {&is_possible_env_var/1, &process_possible_env_var/1}, - password: {&is_possible_env_var/1, &process_possible_env_var/1}, + username: {&possible_env_var?/1, &process_possible_env_var/1}, + password: {&possible_env_var?/1, &process_possible_env_var/1}, topics: {&is_list/1, & &1}, max_future_time: {&is_integer/1, & &1}, fetch_after: {&is_integer/1, & &1}, @@ -187,7 +187,7 @@ defmodule Concentrate do Keyword.new(acc) end - defp is_possible_env_var(value) do + defp possible_env_var?(value) do case value do %{"system" => _} -> true <<_::binary>> -> true diff --git a/lib/concentrate/group_filter/remove_uncertain_stop_time_updates.ex b/lib/concentrate/group_filter/remove_uncertain_stop_time_updates.ex index 4742f4cf..837b3c64 100644 --- a/lib/concentrate/group_filter/remove_uncertain_stop_time_updates.ex +++ b/lib/concentrate/group_filter/remove_uncertain_stop_time_updates.ex @@ -13,8 +13,7 @@ defmodule Concentrate.GroupFilter.RemoveUncertainStopTimeUpdates do If no uncertainty values are configured, enabling this filter has no effect. """ - alias Concentrate.TripDescriptor - alias Concentrate.StopTimeUpdate + alias Concentrate.{StopTimeUpdate, TripDescriptor} @behaviour Concentrate.GroupFilter diff --git a/test/concentrate/encoder/gtfs_realtime_helpers_test.exs b/test/concentrate/encoder/gtfs_realtime_helpers_test.exs index ee29f8cc..54170121 100644 --- a/test/concentrate/encoder/gtfs_realtime_helpers_test.exs +++ b/test/concentrate/encoder/gtfs_realtime_helpers_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.Encoder.GTFSRealtimeHelpersTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.Encoder.GTFSRealtimeHelpers - alias Concentrate.{TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor, VehiclePosition} doctest Concentrate.Encoder.GTFSRealtimeHelpers diff --git a/test/concentrate/encoder/trip_updates/json_test.exs b/test/concentrate/encoder/trip_updates/json_test.exs index d6eb11ae..aa812a63 100644 --- a/test/concentrate/encoder/trip_updates/json_test.exs +++ b/test/concentrate/encoder/trip_updates/json_test.exs @@ -3,7 +3,7 @@ defmodule Concentrate.Encoder.TripUpdates.JSONTest do use ExUnit.Case, async: true import Concentrate.Encoder.TripUpdates.JSON import Concentrate.Encoder.GTFSRealtimeHelpers, only: [group: 1] - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} describe "encode_groups/1" do test "same output as EncoderTripUpdates.encode_groups/1 but in JSON" do diff --git a/test/concentrate/encoder/trip_updates_enhanced_test.exs b/test/concentrate/encoder/trip_updates_enhanced_test.exs index 80b9d2a9..96555a92 100644 --- a/test/concentrate/encoder/trip_updates_enhanced_test.exs +++ b/test/concentrate/encoder/trip_updates_enhanced_test.exs @@ -5,7 +5,7 @@ defmodule Concentrate.Encoder.TripUpdatesEnhancedTest do import Concentrate.Encoder.TripUpdatesEnhanced import Concentrate.Encoder.GTFSRealtimeHelpers, only: [group: 1] alias Concentrate.Parser.GTFSRealtimeEnhanced - alias Concentrate.{TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor, VehiclePosition} describe "encode_groups/1" do test "decoding and re-encoding TripUpdates_enhanced.json is a no-op" do diff --git a/test/concentrate/encoder/trip_updates_test.exs b/test/concentrate/encoder/trip_updates_test.exs index befeea83..ec623c74 100644 --- a/test/concentrate/encoder/trip_updates_test.exs +++ b/test/concentrate/encoder/trip_updates_test.exs @@ -4,7 +4,7 @@ defmodule Concentrate.Encoder.TripUpdatesTest do import Concentrate.TestHelpers import Concentrate.Encoder.TripUpdates import Concentrate.Encoder.GTFSRealtimeHelpers, only: [group: 1] - alias Concentrate.{FeedUpdate, TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{FeedUpdate, StopTimeUpdate, TripDescriptor, VehiclePosition} alias Concentrate.Parser.GTFSRealtime describe "encode_groups/1" do diff --git a/test/concentrate/encoder/vehicle_positions_test.exs b/test/concentrate/encoder/vehicle_positions_test.exs index cd40dd8d..056bd823 100644 --- a/test/concentrate/encoder/vehicle_positions_test.exs +++ b/test/concentrate/encoder/vehicle_positions_test.exs @@ -4,7 +4,7 @@ defmodule Concentrate.Encoder.VehiclePositionsTest do import Concentrate.TestHelpers import Concentrate.Encoder.VehiclePositions import Concentrate.Encoder.GTFSRealtimeHelpers, only: [group: 1] - alias Concentrate.{FeedUpdate, TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{FeedUpdate, StopTimeUpdate, TripDescriptor, VehiclePosition} alias Concentrate.Parser.GTFSRealtime describe "encode/1" do diff --git a/test/concentrate/group_filter/cancelled_trip_test.exs b/test/concentrate/group_filter/cancelled_trip_test.exs index 77dfe236..e3c4bcfa 100644 --- a/test/concentrate/group_filter/cancelled_trip_test.exs +++ b/test/concentrate/group_filter/cancelled_trip_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.CancelledTripTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.CancelledTrip - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} @module Concentrate.Filter.FakeCancelledTrips diff --git a/test/concentrate/group_filter/closed_stop_test.exs b/test/concentrate/group_filter/closed_stop_test.exs index 0d0707ad..4b5665b3 100644 --- a/test/concentrate/group_filter/closed_stop_test.exs +++ b/test/concentrate/group_filter/closed_stop_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.ClosedStopTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.ClosedStop - alias Concentrate.{TripDescriptor, StopTimeUpdate, VehiclePosition} + alias Concentrate.{StopTimeUpdate, TripDescriptor, VehiclePosition} @trip_update TripDescriptor.new(trip_id: "trip", direction_id: 1, route_id: "route") @valid_date_time 8 diff --git a/test/concentrate/group_filter/remove_uncertain_stop_time_updates_test.exs b/test/concentrate/group_filter/remove_uncertain_stop_time_updates_test.exs index fd53907a..5f42df68 100644 --- a/test/concentrate/group_filter/remove_uncertain_stop_time_updates_test.exs +++ b/test/concentrate/group_filter/remove_uncertain_stop_time_updates_test.exs @@ -1,8 +1,7 @@ defmodule Concentrate.GroupFilter.RemoveUncertainStopTimesTest do use ExUnit.Case, async: true alias Concentrate.GroupFilter.RemoveUncertainStopTimeUpdates - alias Concentrate.TripDescriptor - alias Concentrate.StopTimeUpdate + alias Concentrate.{StopTimeUpdate, TripDescriptor} @mid_trip 60 @at_terminal 120 diff --git a/test/concentrate/group_filter/remove_unneeded_times_test.exs b/test/concentrate/group_filter/remove_unneeded_times_test.exs index e08996f0..0cbb1552 100644 --- a/test/concentrate/group_filter/remove_unneeded_times_test.exs +++ b/test/concentrate/group_filter/remove_unneeded_times_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.RemoveUnneededTimesTest do @moduledoc false use ExUnit.Case, async: true alias Concentrate.GroupFilter.RemoveUnneededTimes - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} defmodule FakeStopTimes do @moduledoc "Fake implementation of GTFS.StopTimes" diff --git a/test/concentrate/group_filter/scheduled_stop_times_test.exs b/test/concentrate/group_filter/scheduled_stop_times_test.exs index 297fd9cb..58f71397 100644 --- a/test/concentrate/group_filter/scheduled_stop_times_test.exs +++ b/test/concentrate/group_filter/scheduled_stop_times_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.ScheduledStopTimesTest do @moduledoc false use ExUnit.Case, async: true alias Concentrate.GroupFilter.ScheduledStopTimes - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} defmodule FakeStopTimes do def arrival_departure("trip1", 10, {2022, 1, 1}), do: {1_610_000_000, 1_610_000_001} diff --git a/test/concentrate/group_filter/shuttle_test.exs b/test/concentrate/group_filter/shuttle_test.exs index b1b555a3..da8526db 100644 --- a/test/concentrate/group_filter/shuttle_test.exs +++ b/test/concentrate/group_filter/shuttle_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.ShuttleTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.Shuttle - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} @trip_id "trip" @route_id "route" diff --git a/test/concentrate/group_filter/skipped_stop_on_added_trip_test.exs b/test/concentrate/group_filter/skipped_stop_on_added_trip_test.exs index bb881d24..25aecb34 100644 --- a/test/concentrate/group_filter/skipped_stop_on_added_trip_test.exs +++ b/test/concentrate/group_filter/skipped_stop_on_added_trip_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.Filter.SkippedStopOnAddedTripTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.SkippedStopOnAddedTrip - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} @trip_id "trip" diff --git a/test/concentrate/group_filter/vehicle_at_skipped_stop_test.exs b/test/concentrate/group_filter/vehicle_at_skipped_stop_test.exs index b7473033..eb5cfdba 100644 --- a/test/concentrate/group_filter/vehicle_at_skipped_stop_test.exs +++ b/test/concentrate/group_filter/vehicle_at_skipped_stop_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.VehicleAtSkippedStopTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.VehicleAtSkippedStop - alias Concentrate.{TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor, VehiclePosition} describe "filter/1" do test "if the vehicle's stop_id is SKIPPED, change to the next stop" do diff --git a/test/concentrate/group_filter/vehicle_past_stop_test.exs b/test/concentrate/group_filter/vehicle_past_stop_test.exs index 33728f43..a9fd7ab4 100644 --- a/test/concentrate/group_filter/vehicle_past_stop_test.exs +++ b/test/concentrate/group_filter/vehicle_past_stop_test.exs @@ -2,7 +2,7 @@ defmodule Concentrate.GroupFilter.VehiclePastStopTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.VehiclePastStop - alias Concentrate.{TripDescriptor, VehiclePosition, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor, VehiclePosition} describe "filter/1" do test "removes StopTimeUpdates if they come after the vehicle's sequence" do diff --git a/test/concentrate/group_filter/vehicle_stop_match_test.exs b/test/concentrate/group_filter/vehicle_stop_match_test.exs index b47981f0..946f7adb 100644 --- a/test/concentrate/group_filter/vehicle_stop_match_test.exs +++ b/test/concentrate/group_filter/vehicle_stop_match_test.exs @@ -2,8 +2,8 @@ defmodule Concentrate.GroupFilter.VehicleStopMatchTest do @moduledoc false use ExUnit.Case, async: true import Concentrate.GroupFilter.VehicleStopMatch - alias Concentrate.{StopTimeUpdate, VehiclePosition} alias Concentrate.GTFS.Stops + alias Concentrate.{StopTimeUpdate, VehiclePosition} describe "filter/1" do test "updates the VehiclePosition stop_id to match the StopTimeUpdate" do diff --git a/test/concentrate/merge_filter_test.exs b/test/concentrate/merge_filter_test.exs index 6688a096..450bf6bf 100644 --- a/test/concentrate/merge_filter_test.exs +++ b/test/concentrate/merge_filter_test.exs @@ -4,8 +4,8 @@ defmodule Concentrate.MergeFilterTest do use ExUnitProperties import ExUnit.CaptureLog, only: [capture_log: 1] import Concentrate.MergeFilter - alias Concentrate.{Merge, FeedUpdate, TripDescriptor, VehiclePosition, StopTimeUpdate} alias Concentrate.Encoder.GTFSRealtimeHelpers + alias Concentrate.{FeedUpdate, Merge, StopTimeUpdate, TripDescriptor, VehiclePosition} describe "handle_subscribe/4" do test "lets GenStage manage the demand automatically" do diff --git a/test/concentrate/parser/gtfs_realtime_enhanced_test.exs b/test/concentrate/parser/gtfs_realtime_enhanced_test.exs index 04489ef0..c4b985af 100644 --- a/test/concentrate/parser/gtfs_realtime_enhanced_test.exs +++ b/test/concentrate/parser/gtfs_realtime_enhanced_test.exs @@ -6,14 +6,14 @@ defmodule Concentrate.Parser.GTFSRealtimeEnhancedTest do import Concentrate.Parser.GTFSRealtimeEnhanced alias Concentrate.{ - FeedUpdate, - TripDescriptor, - StopTimeUpdate, - VehiclePosition, Alert, Alert.InformedEntity, + FeedUpdate, Parser.Helpers, - Parser.Helpers.Options + Parser.Helpers.Options, + StopTimeUpdate, + TripDescriptor, + VehiclePosition } describe "parse/1" do diff --git a/test/concentrate/parser/gtfs_realtime_test.exs b/test/concentrate/parser/gtfs_realtime_test.exs index c34f6983..bdbd0b61 100644 --- a/test/concentrate/parser/gtfs_realtime_test.exs +++ b/test/concentrate/parser/gtfs_realtime_test.exs @@ -4,7 +4,7 @@ defmodule Concentrate.Parser.GTFSRealtimeTest do import ExUnit.CaptureLog import Concentrate.TestHelpers import Concentrate.Parser.GTFSRealtime - alias Concentrate.{FeedUpdate, VehiclePosition, TripDescriptor, StopTimeUpdate, Alert} + alias Concentrate.{Alert, FeedUpdate, StopTimeUpdate, TripDescriptor, VehiclePosition} alias Concentrate.Parser.Helpers.Options describe "parse/1" do diff --git a/test/concentrate/parser/helpers_test.exs b/test/concentrate/parser/helpers_test.exs index f0f6a714..2dc0793c 100644 --- a/test/concentrate/parser/helpers_test.exs +++ b/test/concentrate/parser/helpers_test.exs @@ -1,6 +1,7 @@ defmodule Concentrate.Parser.HelpersTest do use ExUnit.Case, async: true import Concentrate.Parser.Helpers + alias Concentrate.Parser.Helpers.Options alias Concentrate.{TripDescriptor, VehiclePosition} describe "drop_fields/2" do @@ -27,8 +28,7 @@ defmodule Concentrate.Parser.HelpersTest do describe "parse_options/1" do test "handles feed_url option" do - assert %Concentrate.Parser.Helpers.Options{feed_url: "url"} = - Concentrate.Parser.Helpers.parse_options(feed_url: "url") + assert %Options{feed_url: "url"} = parse_options(feed_url: "url") end end end diff --git a/test/concentrate/reporter/time_travel_test.exs b/test/concentrate/reporter/time_travel_test.exs index a1388eda..6c25e700 100644 --- a/test/concentrate/reporter/time_travel_test.exs +++ b/test/concentrate/reporter/time_travel_test.exs @@ -4,7 +4,7 @@ defmodule Concentrate.Reporter.TimeTravelTest do import ExUnit.CaptureLog alias Concentrate.Reporter.TimeTravel - alias Concentrate.{TripDescriptor, StopTimeUpdate} + alias Concentrate.{StopTimeUpdate, TripDescriptor} defp build_trip(timings) do td = %TripDescriptor{