Skip to content

Commit

Permalink
correct detect language
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Jan 15, 2024
1 parent 3f097c8 commit bf0bdd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions checkSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ const getSourceFiles = function (dir, ignore, files_) {
}

const detectLanguage = function (ignore) {
/*

if (fs.existsSync('go.mod')) return "go"
let sourceFiles = getSourceFiles('.', ignore)
for (const file of sourceFiles) {
if (path.extname(file) === ".go") return "go"
if (/\.[jt]sx?/.test(path.extname(file))) return "node_js"
}
return "unknown"
*/
/*
let sourceFiles = getSourceFiles('.', ignore)
if (fs.existsSync('go.mod')) return "go"
sourceFiles.forEach(file => {
Expand All @@ -46,7 +46,7 @@ const detectLanguage = function (ignore) {
if (path.extname(file) === ".js") return "node_js"
})
return "unknown"

*/
}


Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ const getSourceFiles = function (dir, ignore, files_) {
}

const detectLanguage = function (ignore) {
/*
if (fs.existsSync('go.mod')) return "go"
let sourceFiles = getSourceFiles('.', ignore)
for (const file of sourceFiles) {
if (path.extname(file) === ".go") return "go"
if (/\.[jt]sx?/.test(path.extname(file))) return "node_js"
}
return "unknown"
*/
/*
let sourceFiles = getSourceFiles('.', ignore)
if (fs.existsSync('go.mod')) return "go"
sourceFiles.forEach(file => {
Expand All @@ -52,6 +51,7 @@ const detectLanguage = function (ignore) {
if (path.extname(file) === ".js") return "node_js"
})
return "unknown"
*/
}


Expand Down

0 comments on commit bf0bdd6

Please sign in to comment.