Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ The project includes VS Code launch configurations for debugging both frontend a
### Code Quality

- `npm run lint` - Check code style for specified files or directories
- `npm run lint:staged` - Run pre-commit checks manually
- `npm run lint:precommit` - Run lint-staged (used by pre-commit hooks)
- `npm run lint:staged` - Lint only git-staged files
- `npm run precommit` - Run full pre-commit checks manually (lint, test, build verify)

## Troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions scripts/lint-staged-dotnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ const runBuild = (projectPath) => {
logger.info(`Force flag enabled, skipping cache for ${projectPath}/ project`)
} else {
try {
if (!needsBuild(projectPath, effectiveProjectName)) {
if (!needsBuild(projectPath, projectName)) {
// Get cached analyzer output instead of skipping analysis
const cachedOutput = getCachedBuildOutput(effectiveProjectName)
const cachedOutput = getCachedBuildOutput(projectName)
logger.success(`Build not needed for ${projectPath}/ project (using cached results)`)

// Check for analyzer warnings in cached output
Expand All @@ -171,7 +171,7 @@ const runBuild = (projectPath) => {

// Store successful build in cache
try {
markAsBuilt(projectPath, effectiveProjectName, result)
markAsBuilt(projectPath, projectName, result)
} catch (error) {
logger.warning(`Failed to cache build result: ${error.message}`)
}
Expand All @@ -188,7 +188,7 @@ const runBuild = (projectPath) => {

// Store build output even for failed builds so analyzers can process it
try {
markAsBuilt(projectPath, effectiveProjectName, output)
markAsBuilt(projectPath, projectName, output)
} catch (error) {
logger.warning(`Failed to cache build output: ${error.message}`)
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-dotnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function ensureBuild() {
function runTests() {
logger.info("Running tests...")
try {
execFileSync("dotnet", ["test", precommitDll, "--no-build", "--verbosity=normal", "--nologo"], {
execFileSync("dotnet", ["test", precommitDll, "--verbosity=normal", "--nologo"], {
encoding: "utf8",
timeout: 300_000, // 5 minute timeout for tests
stdio: "inherit",
Expand Down
2 changes: 1 addition & 1 deletion test/ClinicalScheduler/EmailNotificationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public async Task AddInstructorAsync_AsPrimaryEvaluator_DoesNotSendReplacementEm
var rotationId = 50; // Use unique rotation ID to avoid conflict
var weekIds = new[] { 50 }; // Use unique week ID to avoid conflict
var weekNum = 15;
var testYear = 2025;
var testYear = DateTime.Now.Year;

// Add test data
await AddTestPersonAsync(oldPrimaryMothraId, "Alice", "Johnson");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private async Task<ScheduleAudit> CreateAuditEntryAsync(
WeekId = weekId,
Action = action,
Area = ScheduleAuditAreas.Clinicians,
TimeStamp = DateTime.UtcNow,
TimeStamp = DateTime.Now,
ModifiedBy = modifiedByMothraId
};

Expand Down
8 changes: 4 additions & 4 deletions web/Areas/ClinicalScheduler/Services/ScheduleEditService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public async Task<List<InstructorSchedule>> AddInstructorAsync(
WeekId = weekId,
Evaluator = isPrimaryEvaluator,
ModifiedBy = currentUser.MothraId,
ModifiedDate = DateTime.UtcNow
ModifiedDate = DateTime.Now
};

_context.InstructorSchedules.Add(schedule);
Expand Down Expand Up @@ -410,13 +410,13 @@ await _auditService.LogInstructorRemovedAsync(

schedule.Evaluator = true;
schedule.ModifiedBy = currentUser.MothraId;
schedule.ModifiedDate = DateTime.UtcNow;
schedule.ModifiedDate = DateTime.Now;
}
else
{
schedule.Evaluator = false;
schedule.ModifiedBy = currentUser.MothraId;
schedule.ModifiedDate = DateTime.UtcNow;
schedule.ModifiedDate = DateTime.Now;
}

await _context.SaveChangesAsync(cancellationToken);
Expand Down Expand Up @@ -587,7 +587,7 @@ private async Task<List<InstructorSchedule>> ClearPrimaryEvaluatorAsync(int rota
cancellationToken.ThrowIfCancellationRequested();
schedule.Evaluator = false;
schedule.ModifiedBy = modifiedByMothraId;
schedule.ModifiedDate = DateTime.UtcNow;
schedule.ModifiedDate = DateTime.Now;
}

if (existingPrimary.Any())
Expand Down
Loading