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

Chore/test empty string #64

Closed
wants to merge 21 commits into from
Closed

Conversation

0x4007
Copy link
Member

@0x4007 0x4007 commented Oct 8, 2024

QA #31

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Unused devDependencies (2)

Filename devDependencies
package.json @octokit/rest
simple-git

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Member Author

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Member Author

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Member Author

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

  let currentFile = "";

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      currentFile = line.replace("+++ b/", "");

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

      if (line.includes('""')) {

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_1 = "";

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: Empty string found.

const _EMPTY_STRING_TEST_2 = "";

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

Copy link

@ubiquity-os-deployer ubiquity-os-deployer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

Copy link

@ubiquity-os-deployer ubiquity-os-deployer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty strings detected in the code. Please review.

const diffLines = diff.split("\n");

let currentFile = "";
let lineNumber = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

diffLines.forEach((line) => {
if (line.startsWith("+++ b/")) {
currentFile = line.replace("+++ b/", "");
lineNumber = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

} else if (line.startsWith("+") && !line.startsWith("+++")) {
lineNumber++;
if (line.includes('""')) {
violations.push({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@ import * as dotenv from "dotenv";
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

@@ -2,3 +2,6 @@
// load environment variables (if you have them)
dotenv.config();
console.log("Welcome to ts-template");

const _EMPTY_STRING_TEST_1 = "";
const _EMPTY_STRING_TEST_2 = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Empty string found, consider another approach. Read more.

Copy link

@ubiquity-os-deployer ubiquity-os-deployer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

7 empty strings detected in the code.

.github/empty-string-checker.ts#L59

let currentFile = /* TODO: Replace empty string */;

.github/empty-string-checker.ts#L64

currentFile = line.replace("+++ b/", /* TODO: Replace empty string */);

.github/empty-string-checker.ts#L68

if (line.includes('/* TODO: Replace empty string */')) {

.github/empty-string-checker.ts#L85

.map((v) => `${v.file}#L${v.line}\n\`\`\`suggestion\n${v.content.trim().replace('/* TODO: Replace empty string */', "/* TODO: Replace empty string */")}\n\`\`\``)

.github/empty-string-checker.ts#L93

body: `> [!WARNING]\n> ${violations.length} empty string${violations.length > 1 ? "s" : /* TODO: Replace empty string */} detected in the code.\n\n${annotationsBody}\n\n[Read more about empty string issues](https://www.github.com/ubiquity/ts-template/issues/31).`,

build/index.ts#L6

const _EMPTY_STRING_TEST_1 = /* TODO: Replace empty string */;

build/index.ts#L7

const _EMPTY_STRING_TEST_2 = /* TODO: Replace empty string */;

Read more about empty string issues.

@0x4007 0x4007 closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant