git-repo-analyzer-test 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/.github/copilot-instructions.md +108 -0
  2. package/.idea/aianalyzer.iml +9 -0
  3. package/.idea/misc.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/API_REFERENCE.md +244 -0
  7. package/ENHANCEMENTS.md +282 -0
  8. package/README.md +179 -0
  9. package/USAGE.md +189 -0
  10. package/analysis.txt +0 -0
  11. package/bin/cli.js +135 -0
  12. package/docs/SONARCLOUD_ANALYSIS_COVERED.md +144 -0
  13. package/docs/SonarCloud_Presentation_Points.md +81 -0
  14. package/docs/UI_IMPROVEMENTS.md +117 -0
  15. package/package-lock_cmd.json +542 -0
  16. package/package.json +44 -0
  17. package/package_command.json +16 -0
  18. package/public/analysis-options.json +31 -0
  19. package/public/images/README.txt +2 -0
  20. package/public/images/rws-logo.png +0 -0
  21. package/public/index.html +2433 -0
  22. package/repositories.example.txt +17 -0
  23. package/sample-repos.txt +20 -0
  24. package/src/analyzers/accessibility.js +47 -0
  25. package/src/analyzers/cicd-enhanced.js +113 -0
  26. package/src/analyzers/codeReview-enhanced.js +599 -0
  27. package/src/analyzers/codeReview-enhanced.js:Zone.Identifier +3 -0
  28. package/src/analyzers/codeReview.js +171 -0
  29. package/src/analyzers/codeReview.js:Zone.Identifier +3 -0
  30. package/src/analyzers/documentation-enhanced.js +137 -0
  31. package/src/analyzers/performance-enhanced.js +747 -0
  32. package/src/analyzers/performance-enhanced.js:Zone.Identifier +3 -0
  33. package/src/analyzers/performance.js +211 -0
  34. package/src/analyzers/performance.js:Zone.Identifier +3 -0
  35. package/src/analyzers/performance_cmd.js +216 -0
  36. package/src/analyzers/quality-enhanced.js +386 -0
  37. package/src/analyzers/quality-enhanced.js:Zone.Identifier +3 -0
  38. package/src/analyzers/quality.js +92 -0
  39. package/src/analyzers/quality.js:Zone.Identifier +3 -0
  40. package/src/analyzers/security-enhanced.js +512 -0
  41. package/src/analyzers/security-enhanced.js:Zone.Identifier +3 -0
  42. package/src/analyzers/snyk-ai.js:Zone.Identifier +3 -0
  43. package/src/analyzers/sonarcloud.js +928 -0
  44. package/src/analyzers/vulnerability.js +185 -0
  45. package/src/analyzers/vulnerability.js:Zone.Identifier +3 -0
  46. package/src/cli.js:Zone.Identifier +3 -0
  47. package/src/config.js +43 -0
  48. package/src/core/analyzerEngine.js +68 -0
  49. package/src/core/reportGenerator.js +21 -0
  50. package/src/gemini.js +321 -0
  51. package/src/github/client.js +124 -0
  52. package/src/github/client.js:Zone.Identifier +3 -0
  53. package/src/index.js +93 -0
  54. package/src/index_cmd.js +130 -0
  55. package/src/openai.js +297 -0
  56. package/src/report/generator.js +459 -0
  57. package/src/report/generator_cmd.js +459 -0
  58. package/src/report/pdf-generator.js +387 -0
  59. package/src/report/pdf-generator.js:Zone.Identifier +3 -0
  60. package/src/server.js +431 -0
  61. package/src/server.js:Zone.Identifier +3 -0
  62. package/src/server_cmd.js +434 -0
  63. package/src/sonarcloud/client.js +365 -0
  64. package/src/sonarcloud/scanner.js +171 -0
  65. package/src.zip +0 -0
@@ -0,0 +1,81 @@
1
+ # SonarCloud Analysis — Points Covered (Presentation)
2
+
3
+ **Use this for slides or a one-pager.** List format, optimized for presenting.
4
+
5
+ ---
6
+
7
+ ## 1. Quality Gate
8
+
9
+ - Status: **OK** | **ERROR** | **NONE**
10
+ - Conditions: metric key, status, threshold
11
+ - Visual: Green (OK), Red (ERROR), Grey (NONE)
12
+
13
+ ---
14
+
15
+ ## 2. Metrics
16
+
17
+ **Core (free tier)**
18
+ - Lines of code (ncloc)
19
+ - Bugs
20
+ - Vulnerabilities
21
+ - Code smells
22
+ - Coverage %
23
+ - Duplication %
24
+
25
+ **Extended (when available)**
26
+ - Security hotspots (+ reviewed %)
27
+ - Maintainability / Reliability / Security ratings (A–E)
28
+ - Complexity & cognitive complexity
29
+ - Duplicated blocks, total lines
30
+
31
+ ---
32
+
33
+ ## 3. Issues
34
+
35
+ - List: key, rule, severity, file, line, message
36
+ - Severities: BLOCKER, CRITICAL, MAJOR, MINOR, INFO
37
+ - Breakdown: bugs, vulnerabilities, code smells, hotspots
38
+ - Chart: issues by severity
39
+
40
+ ---
41
+
42
+ ## 4. Score & Rating
43
+
44
+ - **Score:** 0–10 (from bugs, vulns, smells, quality gate, ratings, coverage)
45
+ - **Rating:** A+ to F
46
+ - Shown in KPI card and overall summary
47
+
48
+ ---
49
+
50
+ ## 5. Recommendations
51
+
52
+ - Quality gate → fix failing conditions
53
+ - Bugs → address reported bugs
54
+ - Vulnerabilities → remediate
55
+ - Code smells → reduce for maintainability
56
+ - Coverage → aim for 80%+
57
+ - Duplication → reduce duplicated lines
58
+
59
+ ---
60
+
61
+ ## 6. Dashboard / UI
62
+
63
+ - **KPI cards:** Quality Score, Quality Gate, Lines of Code, Total Issues
64
+ - **Charts:** Issues breakdown, Coverage & duplication, Issues by severity
65
+ - **Tiles:** LOC, bugs, vulns, smells, hotspots, duplication, coverage, complexity
66
+ - **Tables:** Quality gate conditions, issues list
67
+ - **Link:** Open project on SonarCloud
68
+
69
+ ---
70
+
71
+ ## 7. APIs (Free Plan)
72
+
73
+ - Quality gate status
74
+ - Measures / component (metrics)
75
+ - Issues search
76
+
77
+ ---
78
+
79
+ ## One-line summary
80
+
81
+ **Quality gate + core & extended metrics + issues + computed score/rating + recommendations + dashboard (KPIs, charts, tables, SonarCloud link).**
@@ -0,0 +1,117 @@
1
+ # UI Improvement Ideas for GitHub Repo Analyzer
2
+
3
+ Prioritized by impact and effort. Pick what fits your goals.
4
+
5
+ ---
6
+
7
+ ## High impact, lower effort
8
+
9
+ ### 1. **Sticky report toolbar**
10
+ When viewing results, keep a thin bar at the top with:
11
+ - Repo name (link to GitHub)
12
+ - **Analyze another** and **Export PDF**
13
+ - Optional: anchor links to each section (Quality, Security, etc.)
14
+
15
+ **Why:** Long reports require scrolling; actions stay visible without scrolling back up.
16
+
17
+ ### 2. **Loading progress steps**
18
+ Instead of a single “Analyzing repository…”, show steps:
19
+ - Fetching repository
20
+ - Code quality
21
+ - Security
22
+ - Code review
23
+ - Performance
24
+
25
+ **Why:** Reduces perceived wait and makes it clear the app is working (and which step is slow).
26
+
27
+ ### 3. **Empty states with CTAs**
28
+ When an analyzer has no token:
29
+ - Short message + “Add token for live results” (and link to README or env docs).
30
+
31
+ **Why:** Users understand why they see mock data and how to enable real data.
32
+
33
+ ### 4. **Keyboard & accessibility**
34
+ - **Enter** in the repo input runs analysis.
35
+ - After analysis, focus moves to the results area (or first section).
36
+ - `aria-expanded` / `aria-controls` on collapsible section headers.
37
+ - Visible focus styles for all interactive elements.
38
+
39
+ **Why:** Faster for power users and better for screen readers and a11y.
40
+
41
+ ### 5. **Success feedback**
42
+ - After PDF export: small toast or inline message “PDF downloaded” (and optionally filename).
43
+ - After analysis: brief “Analysis complete” (can be subtle).
44
+
45
+ **Why:** Clear confirmation that actions succeeded.
46
+
47
+ ### 6. **Copy repo / open on GitHub**
48
+ - Next to the repo title: “Open on GitHub” (e.g. `https://github.com/owner/repo`) and “Copy link”.
49
+
50
+ **Why:** Common next step is to open the repo or share the link.
51
+
52
+ ---
53
+
54
+ ## Medium impact
55
+
56
+ ### 7. **Expand / collapse all**
57
+ Buttons: “Expand all” and “Collapse all” above the sections.
58
+
59
+ **Why:** One click to scan all sections or to collapse and focus on scores.
60
+
61
+ ### 8. **Responsive tweaks**
62
+ - Score cards: 2 columns on tablet, 1 on small mobile.
63
+ - Section headers: larger tap target and spacing on touch devices.
64
+ - Action buttons: full width on small screens if needed.
65
+
66
+ **Why:** Usable on phones and tablets.
67
+
68
+ ### 9. **Theme toggle (dark / light)**
69
+ - Toggle in header; store preference in `localStorage`.
70
+ - Use CSS variables so one toggle switches the whole theme.
71
+
72
+ **Why:** Preference for light mode in bright environments.
73
+
74
+ ### 10. **Recent repos (localStorage)**
75
+ - Store last 3–5 analyzed repos; show as chips or a dropdown under the input.
76
+ - Click to re-analyze.
77
+
78
+ **Why:** Quick re-runs for the same repos.
79
+
80
+ ---
81
+
82
+ ## Higher effort, high impact
83
+
84
+ ### 11. **Streaming / progressive results**
85
+ - API returns or streams results as each analyzer finishes.
86
+ - UI shows sections as they become available (skeleton → content).
87
+
88
+ **Why:** Feels faster and more responsive.
89
+
90
+ ### 12. **Comparison mode**
91
+ - “Compare” a second repo; show two columns (or tabs) with scores and key metrics side by side.
92
+
93
+ **Why:** Direct comparison for decision-making.
94
+
95
+ ### 13. **Charts**
96
+ - Small charts for quality/security over time (if you add history) or for score breakdown (e.g. radar or bar chart).
97
+
98
+ **Why:** Easier to see balance across dimensions.
99
+
100
+ ### 14. **Search / filter in report**
101
+ - Filter findings by severity (e.g. only High/Critical) or by section.
102
+
103
+ **Why:** Large reports become easier to navigate.
104
+
105
+ ---
106
+
107
+ ## Quick wins already in place
108
+ - Full-width layout
109
+ - Collapsible sections
110
+ - Dark theme and clear typography
111
+ - Score cards with color-coded borders
112
+ - AI analysis sections with badges
113
+
114
+ ---
115
+
116
+ **Suggested order to implement:**
117
+ Start with **1 (sticky toolbar)**, **2 (loading steps)**, and **4 (Enter key + focus)**; then add **3 (empty states)** and **5 (success feedback)**.