fix: resolve CI/CD issues - remove unused dependencies and imports

- Remove unused thiserror dependency from Cargo.toml
- Remove unused imports (Text, Tabs, Widget, Event, KeyCode, KeyEventKind) from tui/mod.rs
- Remove unused imports (File, Write) from export/mod.rs
- Remove unused pub use ComplexityDistribution from core/analyzer.rs
This commit is contained in:
Developer
2026-02-05 15:56:58 +00:00
parent 1da735b646
commit 98e8df8906
23 changed files with 2880 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
// JavaScript sample file with technical debt comments
function calculateTotal(items) {
// TODO: This should use reduce instead of a loop
let total = 0;
for (let i = 0; i < items.length; i++) {
total += items[i].price;
}
return total;
}
function fetchUserData(userId) {
// FIXME: API error handling is missing
// FIXME: This endpoint may return null
return fetch(`/api/users/${userId}`)
.then(response => response.json());
}
function processPayment(amount) {
// HACK: Quick fix for holiday season
if (amount > 1000) {
console.log("High value transaction");
}
// TODO: Implement proper payment processing
}
function createUser(name, email) {
// NOTE: Email validation is basic
if (!email.includes('@')) {
throw new Error('Invalid email');
}
return { name, email };
}
class DataProcessor {
constructor() {
this.data = [];
// XXX: Memory leak - data is never cleared
}
addItem(item) {
this.data.push(item);
}
process() {
// BUG: This doesn't handle edge cases
return this.data.map(x => x * 2);
}
}
// TODO: Add JSDoc comments
// TODO: Write unit tests
async function loadConfig() {
// FIXME: Hardcoded path should be configurable
const response = await fetch('/config.json');
return response.json();
}
function temporaryFix() {
// TEMP: Remove this after Q1
return { status: 'pending' };
}
function oldCode() {
// REFACTOR: This code is legacy
let result = 0;
for (let i = 0; i < 10; i++) {
result += i;
}
return result;
}
module.exports = {
calculateTotal,
fetchUserData,
processPayment,
createUser,
DataProcessor,
loadConfig,
};