towerops/lib/towerops_web/live
mayor 0a978746e1
Fix all Credo issues
Resolves 26 Credo warnings/issues:

Code Readability (2 issues):
- Break long line in mac_address.ex (line 316 > 120 chars)
- Break long @spec in agents.ex (line 332 > 120 chars)

Refactoring Opportunities (2 issues):
- Reduce cyclomatic complexity in device_live/form.ex
  - Extract helper functions to simplify SNMPv3 credential resolution
  - Split logic into smaller, focused functions
- Reduce nesting depth in snmp_oid.ex
  - Extract nested logic into separate helper functions

Warnings (22 issues):
- Fix comparison warning in validator.ex
  - Split validate_sensor_value/1 into separate clauses for int/float
  - Add credo directive for valid NaN check (value != value)
- Replace 21 expensive length/1 checks with Enum.empty?/1
  - Change assertions from `assert length(list) >= 1` to `refute Enum.empty?(list)`
  - Change assertions from `assert length(list) > 0` to `refute Enum.empty?(list)`
  - Affected files: device_poller_worker_test.exs, mib_test.exs,
    snmp_tokenizer_test.exs, parser_test.exs, error_test.exs, compiler_test.exs

All tests passing (5578 tests, 0 failures).
Credo now reports: "found no issues"
2026-02-06 10:31:09 -06:00
..
account_live Replace single name field with first_name and last_name 2026-02-01 15:00:23 -06:00
admin add device count to superadmin 2026-02-06 09:32:13 -06:00
agent_live refactor: consolidate device count calculations in agent_live 2026-02-04 17:53:18 -06:00
alert_live refactor: centralize LiveView access control checks 2026-02-04 17:51:05 -06:00
device_live Fix all Credo issues 2026-02-06 10:31:09 -06:00
graph_live fix mistaken poller ids 2026-02-05 13:57:15 -06:00
help_live help update 2026-02-04 17:56:48 -06:00
helpers refactor: centralize LiveView access control checks 2026-02-04 17:51:05 -06:00
mikrotik_backup_live handle mikrotik ssh 2026-02-02 16:42:18 -06:00
org UI improvements 2026-02-05 14:57:11 -06:00
org_live UI improvements 2026-02-05 14:57:11 -06:00
site_live make devices site optional and many test fix 2026-02-04 15:05:42 -06:00
user_settings_live more gettext 2026-02-02 13:10:08 -06:00
dashboard_live.ex make devices site optional and many test fix 2026-02-04 15:05:42 -06:00
dashboard_live.html.heex make devices site optional and many test fix 2026-02-04 15:05:42 -06:00
mobile_qr_live.ex more dark mode 2026-01-20 17:23:11 -06:00
network_map_live.ex filter more honeybadger alerts, format dates to users time zone, email template cleanup 2026-02-01 09:27:42 -06:00
network_map_live.html.heex refactoring 2026-01-29 10:03:43 -06:00
user_registration_live.ex add snmp port 2026-02-03 12:51:50 -06:00
user_reset_password_live.ex add HIBP password check 2026-02-01 08:57:01 -06:00
user_settings_live.ex add default org 2026-02-02 10:45:37 -06:00
user_settings_live.html.heex add default org 2026-02-02 10:45:37 -06:00