Skip to content

Commit

Permalink
refactor: remove unused DocumentationGenerator code
Browse files Browse the repository at this point in the history
Move compliance control validation into KitDependencyAnalyzer.
This ensures that controls are validated during "tree" commands. Before
this change, only the "collie foundation docs" command validated that
compliance statements reference actual controls.
  • Loading branch information
JohannesRudolph committed Aug 28, 2024
1 parent 834aa32 commit b584957
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 413 deletions.
14 changes: 13 additions & 1 deletion src/commands/prepareAnalyzeCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Logger } from "../cli/Logger.ts";
import { ComplianceControlRepository } from "../compliance/ComplianceControlRepository.ts";
import {
FoundationDependencies,
KitDependencyAnalyzer,
Expand Down Expand Up @@ -32,11 +33,22 @@ async function analyze(
const validator = new ModelValidator(logger);

const modules = await KitModuleRepository.load(collie, validator, logger);
const controls = await ComplianceControlRepository.load(
collie,
validator,
logger,
);

const foundations = await collie.listFoundations();

const tasks = foundations.map(async (f) => {
const foundation = await FoundationRepository.load(collie, f, validator);
const analyzer = new KitDependencyAnalyzer(collie, modules, logger);
const analyzer = new KitDependencyAnalyzer(
collie,
modules,
controls,
logger,
);

return {
foundation,
Expand Down
28 changes: 0 additions & 28 deletions src/docs/ComplianceDocumentationGenerator.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/docs/DocumentationGenerator.ts

This file was deleted.

102 changes: 0 additions & 102 deletions src/docs/KitModuleDocumentationGenerator.ts

This file was deleted.

202 changes: 0 additions & 202 deletions src/docs/PlatformDocumentationGenerator.ts

This file was deleted.

Loading

0 comments on commit b584957

Please sign in to comment.