hacktivist123 / goignore

A lightweight CLI tool for generating .gitignore file in your project. Built with Go and ❤️
MIT License
29 stars 6 forks source link

Bug: Language detection #19

Closed chuksgpfr closed 1 year ago

chuksgpfr commented 1 year ago

The PR for language detection, loops through the array and replaces the latest extension with the latter.

e.g. If the last file to walk through is a .js file in a typescript codebase, the language is detected as Javascript.

@hacktivist123

hacktivist123 commented 1 year ago

Oh yes, I haven’t created a specific file for typescript projects yet so since Typescript is mostly JavaScript. I just default to generating a JavaScript gitignore for ts files for now.

Unless I didn’t get your issue

chuksgpfr commented 1 year ago

Check the PR I'll open next (I'll leave it as a draft), You can let me know if you want me to test it and you can merge it.

chuksgpfr commented 1 year ago

My draft PR

@hacktivist123

hacktivist123 commented 1 year ago

Oh shit, I get it now.

I didn’t consider this edge case, damn! Good catch.

I’ll test it out and merge.

Open the PR for merge

chuksgpfr commented 1 year ago

I will do that, I need to ignore directories that start with (.). The WalkDir traverses through .git directory 🥲

hacktivist123 commented 1 year ago

fixed in #20