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

fix: removed redundant info and changed standard messages #140

Merged
merged 2 commits into from
Jan 6, 2022
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
2 changes: 1 addition & 1 deletion core/plugins/stack/css/linters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const introspect: IntrospectFn<Linters> = async (context) => {
if (anyValue(linters)) return linters;

if (context.suggestDefault) {
logger.warning("No CSS linter detected, using stylelint");
logger.warning("No CSS linter detected, using Stylelint");
return {
stylelint: { name: "stylelint" },
};
Expand Down
3 changes: 1 addition & 2 deletions core/plugins/stack/markdown/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export const introspector: Introspector<MarkdownProject> = {
},
introspect: async (context) => {
const logger = await context.getLogger("markdown");
joao10lima marked this conversation as resolved.
Show resolved Hide resolved
logger.info("Detected Markdown File");

logger.debug("detected markdown file");
return {};
},
};
4 changes: 2 additions & 2 deletions core/plugins/stack/python/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const introspect: IntrospectFn<Formatters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No formatters for python were identified in the project, creating default pipeline with 'black' WITHOUT any specific configuration",
"No Python formatter detected, using Black",
);
formatters.black = {
isDependency: false,
Expand All @@ -35,7 +35,7 @@ export const introspect: IntrospectFn<Formatters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No formatters for python were identified in the project, creating default pipeline with 'isort' WITHOUT any specific configuration",
"No Python linter detected, using isort",
);
formatters.isort = {
isDependency: false,
Expand Down
4 changes: 2 additions & 2 deletions core/plugins/stack/python/linters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const introspect: IntrospectFn<Linters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No linters for python were identified in the project, creating default pipeline with 'flake8' WITHOUT any specific configuration",
"No Python linter detected, using Flake8",
);
linters.flake8 = {
isDependency: false,
Expand All @@ -43,7 +43,7 @@ export const introspect: IntrospectFn<Linters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No linters for python were indentified in the project, creating default with 'bandit' WITHOUT any specific configuration",
"No Python linter detected, using Bandit",
);
linters.bandit = {
isDependency: false,
Expand Down
2 changes: 1 addition & 1 deletion core/plugins/stack/ruby/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const introspect: IntrospectFn<Formatters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No formatters for ruby were identified in the project, creating default pipeline with 'Rubocop' WITHOUT any specific configuration",
"No Ruby formatter detected, using Rubocop",
);
formatters.rubocop = {
isDependency: false,
Expand Down
2 changes: 1 addition & 1 deletion core/plugins/stack/ruby/linters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const introspect: IntrospectFn<Linters> = async (context) => {
} else {
if (context.suggestDefault) {
logger.warning(
"No linters for ruby were identified in the project, creating default pipeline with 'Rubocop' WITHOUT any specific configuration",
"No Ruby linter detected, using Rubocop",
);
linters.rubocop = {
isDependency: false,
Expand Down
1 change: 0 additions & 1 deletion core/plugins/stack/ruby/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const introspector: Introspector<RubyProject | undefined> = {
},
introspect: async (context) => {
const logger = context.getLogger("ruby");
logger.info("Detected Ruby File");

// Version
logger.debug("detecting version");
Expand Down
18 changes: 9 additions & 9 deletions tests/default_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ test(
);
assertStringIncludes(
stdout,
"No linters for python were identified in the project, creating default pipeline with 'flake8' WITHOUT any specific configuration",
"No Python linter detected, using Flake8",
);
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'black' WITHOUT any specific configuration",
"No Python formatter detected, using Black",
);
assertEquals(code, 0);
await assertExpectedFiles();
Expand All @@ -62,11 +62,11 @@ test(
assertStringIncludes(stdout, "Detected stack: python");
assertStringIncludes(
stdout,
"No linters for python were identified in the project, creating default pipeline with 'flake8' WITHOUT any specific configuration",
"No Python linter detected, using Flake8",
);
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'isort' WITHOUT any specific configuration",
"No Python linter detected, using isort",
);
assertEquals(code, 0);
await assertExpectedFiles();
Expand All @@ -80,15 +80,15 @@ test(

assertStringIncludes(
stdout,
"No linters for python were identified in the project, creating default pipeline with 'flake8' WITHOUT any specific configuration",
"No Python linter detected, using Flake8",
);
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'black' WITHOUT any specific configuration",
"No Python formatter detected, using Black",
);
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'isort' WITHOUT any specific configuration",
"No Python linter detected, using isort",
);
assertEquals(code, 0);
await assertExpectedFiles();
Expand Down Expand Up @@ -154,7 +154,7 @@ test(
assertStringIncludes(stdout, "Detected stack: markdown, python, shell");
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'black' WITHOUT any specific configuration",
"No Python formatter detected, using Black",
);
assertEquals(code, 0);
await assertExpectedFiles();
Expand Down Expand Up @@ -184,7 +184,7 @@ test(
assertStringIncludes(stdout, "Detected stack: python");
assertStringIncludes(
stdout,
"No formatters for python were identified in the project, creating default pipeline with 'black' WITHOUT any specific configuration",
"No Python formatter detected, using Black",
);
assertEquals(code, 0);
await assertExpectedFiles();
Expand Down