Giter Club home page Giter Club logo

Comments (8)

joeblau avatar joeblau commented on May 12, 2024 2

Ah yeah, someone else posted something similar to this before. I think their issue was due to the fact that they selected Xcode, objective-c and swift; some of which are just aliases of each other. You can check issue #83 for more details. That awk command is very handy; if we can figure out a way to roll that into the core, I think it will be very helpful.

from gitignore.io.

joeblau avatar joeblau commented on May 12, 2024

The way the project is setup, the swift and objective-c links are just an alias of xcode. You only need one of them, but I wanted to make it easier for people who were searching to find the one they need. I could probably check on load to see if you're running an aliased file and remove it from the results.

from gitignore.io.

DenTelezhkin avatar DenTelezhkin commented on May 12, 2024

Well, not exactly, it seems Xcode ignores does not include CocoaPods, but Swift and Objective-C do.

It would be great to just print out the first part, it contains everything needed for iOS/Mac development.

from gitignore.io.

joeblau avatar joeblau commented on May 12, 2024

All three of those templates come from the official GitHub gitignore repository. One thing that might be able to clean it up is that I was thinking about adding a .patch file type which would allow me to add/remove lines in some fashion to clean up templates for cases like this. I haven't had time to really work on that feature, but a patch would basically define what should be included when a gi is run and multiple file types should be merged.

from gitignore.io.

saxbophone avatar saxbophone commented on May 12, 2024

Another thing I've found which is highly related to this, is that identical ignores are not eliminated when combining languages - for example: https://www.gitignore.io/api/python%2Cc%2Cc%2B%2B

Notice that *.so has been included 3 times, once for every language (in this case, Python, C and C++).

I was able to trim down about 60 lines of the file by putting it through this little bit of awk magic I found on stack overflow:

awk '!seen[$0]++' .gitignore

Solving this particular issue would not solve the issue around similar ignores, but might be a fair stopping-point pending addressing the main issue.

from gitignore.io.

saxbophone avatar saxbophone commented on May 12, 2024

Thanks @joeblau , glad you find it helpful! I'm pretty sure there'll be a straightforward way of replicating its functionality within Node. I'm not very familiar with this codebase and am not a pro Node dev, but I'd be interested in having a look around (may need you to point me in the right direction 😉) to see if I can get something working.
Let me know what you think

Btw, sorry for such a late reply, I wish there were a way to 'mark as unread' or 'reply later' on github notifications...

from gitignore.io.

saxbophone avatar saxbophone commented on May 12, 2024

Have implemented that stop-gap solution I mentioned, PR #227

from gitignore.io.

joeblau avatar joeblau commented on May 12, 2024

#227 Removes duplicate lines so if you have similar ignores, you still wont have duplicate lines in the template. This doesn't account for comments yet, but it's a good start.

from gitignore.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.