Commit e203596
refactor: consolidate TUI code, add tests, centralize HTTP client, improve error handling (#74)
* refactor: consolidate TUI code, add tests, centralize HTTP client, improve error handling
Seven-phase code quality improvement:
- Fix double scanFile() call, empty-list guards, synchronized(AtomicInteger), path traversal
- Add PomEditSessionTest (14 tests) and SortStateTest (18 tests)
- Consolidate quit/save/diff into ToolPanel base class with hook methods
- Extract renderStandaloneInfoBar template method, eliminating info bar duplication
- Extract SearchController, removing ~100 lines of duplicated search code from ModuleTreePane
- Create MavenCentralClient centralizing all Maven Central HTTP logic, remove ReleaseDateFetcher
- Add vulnFetchFailed tracking in AuditTui, add stderr logging to silent catch blocks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address SonarCloud findings (S106, S112, S1075, S1066, S3776, S5838)
Replace System.err with java.util.logging.Logger in PilotMain and
PilotEngine. Use IOException/ParserConfigurationException instead of
generic Exception in MavenCentralClient. Extract pomBasePath to avoid
hardcoded path delimiter. Merge nested if in getChildText. Split
SearchController.handleSearchInput to reduce cognitive complexity.
Use assertThat().isZero() in SortStateTest.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address remaining SonarCloud findings (S112, S3516)
Use specific exception types in MavenCentralClient.parsePomInfo.
Refactor SearchController.handleSearchModeInput to void since it
always returns true.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: retrigger CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address CodeRabbit review findings
- Use toRealPath() for symlink-safe reactor root boundary check
- Remove misleading Enter:Details hint from ConflictsTui
- Fix DependenciesTui key hints: s→c for scope, view-specific actions
- Fix fetchVersions partial-result ordering bug on exception
- Avoid restarting date fetches when quit is cancelled in UpdatesTui
- Strengthen SortStateTest reverseDirection assertions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address new SonarCloud findings (S6541, S1192)
Extract recurseIntoModules from discoverModulesRecursive to reduce
cognitive complexity. Extract HINT_REMOVE constant in DependenciesTui
to eliminate duplicate string literal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 73c27cc commit e203596
15 files changed
Lines changed: 1197 additions & 758 deletions
File tree
- pilot-cli/src/main/java/eu/maveniverse/maven/pilot/mvn4
- pilot-core/src
- main/java/eu/maveniverse/maven/pilot
- test/java/eu/maveniverse/maven/pilot
Lines changed: 37 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | | - | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
191 | | - | |
| 195 | + | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
254 | 274 | | |
255 | 275 | | |
256 | | - | |
257 | | - | |
258 | 276 | | |
259 | 277 | | |
260 | 278 | | |
| |||
429 | 447 | | |
430 | 448 | | |
431 | 449 | | |
432 | | - | |
| 450 | + | |
433 | 451 | | |
434 | 452 | | |
435 | 453 | | |
| |||
Lines changed: 35 additions & 90 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
| |||
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
480 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
481 | 485 | | |
482 | 486 | | |
483 | 487 | | |
| |||
643 | 647 | | |
644 | 648 | | |
645 | 649 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
| 650 | + | |
662 | 651 | | |
663 | 652 | | |
664 | 653 | | |
| |||
795 | 784 | | |
796 | 785 | | |
797 | 786 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
815 | 790 | | |
816 | 791 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
825 | 795 | | |
826 | 796 | | |
827 | 797 | | |
| |||
878 | 848 | | |
879 | 849 | | |
880 | 850 | | |
881 | | - | |
| 851 | + | |
882 | 852 | | |
883 | 853 | | |
884 | 854 | | |
| |||
1818 | 1788 | | |
1819 | 1789 | | |
1820 | 1790 | | |
1821 | | - | |
1822 | | - | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | | - | |
| 1791 | + | |
| 1792 | + | |
1830 | 1793 | | |
1831 | | - | |
1832 | | - | |
1833 | | - | |
1834 | | - | |
1835 | | - | |
1836 | | - | |
1837 | | - | |
1838 | | - | |
1839 | | - | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
1867 | | - | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1868 | 1813 | | |
1869 | 1814 | | |
1870 | 1815 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
0 commit comments