079346a1b9
fix: resolve all 281 credo issues across source and test files
...
Build and Push / Build and Push Docker Image (push) Failing after 4m38s
- F-level (228): replace length/1 with Enum.count_until/2 or pattern
matching; convert Enum.flat_map+if to Enum.filter+Enum.map; fix
identity case in narr_client
- W-level (46): normalize dual atom/string key access in weather_layers,
beacon_measurements, surface, skewt_live, contact_live/show; add
:data_provider and weather-map assigns to ignored_assigns in credo
config (consumed by child components credo can't trace); remove
weak is_list assertion; remove explicit assert_receive timeout
- R-level (6): replace 'This module provides...' moduledocs with
meaningful descriptions
- Also fix 4 compile-connected xref issues by deferring
BandConfig.band_options() from module attribute to runtime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-29 09:04:21 -05:00
fd976b0cd5
fix: resolve 391 Credo issues across codebase
...
- Add jump_credo_checks ~> 0.4 with all 20 checks enabled
- Fix all standard Credo issues: 139 @spec (113 done, 26 remain),
4 refactoring, 3 alias usage, 9 System.cmd env, 5 unsafe_to_atom,
2 max line length, 9 assert_receive timeout
- Fix 170+ jump_credo_checks warnings:
- 117 TopLevelAliasImportRequire: move nested alias/import to module top
- 32 UseObanProWorker: switch to Oban.Pro.Worker
- 4 DoctestIExExamples: add doctests / create test file
- ~20 WeakAssertion: strengthen type-check assertions
- Various ConditionalAssertion, AssertReceiveTimeout fixes
- Exclude vendor/ from Credo analysis
- Remaining: 175 warnings (mostly opinionated WeakAssertion,
AvoidSocketAssignsInTest), 26 @spec annotations
2026-06-12 13:51:32 -05:00
316fb2fbc7
Fix low-severity bugs and re-enable Credo checks
...
- Bug #12 : Lower rate limit to 15/min
- Bug #13 : Wrap model loading in Task.start
- Bug #14 : Fix classify_time_period guard gap at -3.0
- Bug #15 : Not applicable (Elixir has no ?? operator)
- Bug #16 : Remove fallback Repo.get for station preload
- Bug #17 : Extract cache_key() in ContactMapController
- Bug #18 : Add has_many :contacts and :beacons to User schema
- A&D #4 : Move serve_markdown_if_requested after secure headers
- Config #1 : Move signing_salt to runtime.exs env var
- Config #2 : Use --check-unused instead of --unused
- Config #3 : Re-enable UnsafeToAtom Credo check
- Config #5 : Re-enable LeakyEnvironment Credo check
- Add @spec annotations to fix re-enabled Specs violations
- Replace String.to_atom with to_existing_atom where guarded
2026-05-29 17:29:22 -05:00
7fb340bc35
Fix all remaining credo --strict issues (0 issues)
...
Aliases: add module aliases for 9 nested module references
Apply: replace apply/3 with direct module attribute calls
Line length: break 1 long spec line
Refactoring: extract helpers to reduce complexity and nesting
in show.ex, radio.ex, weather workers, terrain, duct detection,
backfill dashboard, contact map, and mix tasks
2026-04-12 10:26:53 -05:00
1d86e287b2
Add password auth with callsign + email confirmation
...
Generated Accounts context, User schema, and controllers via
phx.gen.auth. Adapted it for password-only login with required
email confirmation:
- Users have callsign (unique, uppercased), name, email, password
- Registration form fields: callsign, name, email, password, confirm
- Magic-link login path removed; login is email + password only
- After register, a confirmation email is sent and login is blocked
until the account is confirmed via the token URL
- Confirmation link logs the user in on first use
- SMTP2GO configured as the outgoing mailer in k8s prod
2026-04-08 10:21:40 -05:00