Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(enrich): put summarization in separate folder #397

Merged
merged 1 commit into from
Nov 16, 2020
Merged
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
refactor(enrich): put summarization in separate folder
  • Loading branch information
sverweij committed Nov 15, 2020
commit d28f54abe940fd39c2698ae12463550366ba7411
8 changes: 4 additions & 4 deletions src/enrich/summarize.js → src/enrich/summarize/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const addRuleSetUsed = require("./add-rule-set-used");
const summarizeModules = require("./summarize-modules");
const summarizeOptions = require("./summarize-options");
const addRuleSetUsed = require("./add-rule-set-used");

/**
*
* @param {import("../../types/cruise-result").IModule[]} pModules -
* @param {import("../../../types/cruise-result").IModule[]} pModules -
* cruised modules that have been enriched with mandatory attributes &
* have been validated against rules as passed in the options
* @param {import("../../types/options").ICruiseOptions} pOptions -
* @param {import("../../../types/options").ICruiseOptions} pOptions -
*
* @param {string[]} pFileDirectoryArray -
* the files/ directories originally passed to be cruised
*
* @returns {import("../../types/cruise-result").ISummary} -
* @returns {import("../../../types/cruise-result").ISummary} -
* a summary of the found modules, dependencies and any violations
*/
module.exports = function makeSummary(pModules, pOptions, pFileDirectoryArray) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const _flattenDeep = require("lodash/flattenDeep");
const _get = require("lodash/get");
const findRuleByName = require("../graph-utl/find-rule-by-name");
const compare = require("../graph-utl/compare");
const findRuleByName = require("../../graph-utl/find-rule-by-name");
const compare = require("../../graph-utl/compare");
const deDuplicateViolations = require("./de-duplicate-violations");

function cutNonTransgressions(pSourceEntry) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const _get = require("lodash/get");
const _has = require("lodash/has");
const extract = require("../extract");
const enrich = require("../enrich");
const summarizeModules = require("../enrich/summarize-modules");
const summarizeModules = require("../enrich/summarize/summarize-modules");
const cruiseResultSchema = require("../schema/cruise-result.schema.json");
const meta = require("../extract/transpile/meta");
const report = require("../report");
Expand Down
2 changes: 1 addition & 1 deletion test/enrich/de-duplicate-violations.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { expect } = require("chai");
const deDuplicateViolations = require("../../src/enrich/de-duplicate-violations");
const deDuplicateViolations = require("../../src/enrich/summarize/de-duplicate-violations");

describe("enrich/de-duplicate-violations", () => {
it("no violations => no violations", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/enrich/summarize-modules.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const chai = require("chai");
const summarize = require("../../src/enrich/summarize-modules");
const summarize = require("../../src/enrich/summarize/summarize-modules");

const expect = chai.expect;

Expand Down