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

file exclusions #125

Closed
naseemkullah opened this issue Aug 4, 2021 · 5 comments · Fixed by #124
Closed

file exclusions #125

naseemkullah opened this issue Aug 4, 2021 · 5 comments · Fixed by #124

Comments

@naseemkullah
Copy link
Collaborator

naseemkullah commented Aug 4, 2021

Hello @ppremk, would you be on board with adding an option to exclude certain files/file extensions from the large file check?

e.g. only want to warn on miniified js or large json files, but not xcode project.pbxproj files

@ppremk
Copy link
Owner

ppremk commented Aug 4, 2021

hi @naseemkullah 👋🏽
What would be the use case? I am thinking along the lines where git tracks content and the size of the blob is what we are comparing against.. How would the logic change here? 🙂 Asking to better understand the implementation.

@brenmcnamara
Copy link

brenmcnamara commented Aug 4, 2021

hi @ppremk ,

Thanks so much for the quick response and taking a look 🙂

I work with @naseemkullah and we raised this issue today. The use case we have is:

  1. We would like to prevent large file blobs from getting into our repo and warn against that
  2. We have one particular exception to this rule, which is Xcode's project.pbxproj file

This is a text file that Xcode maintains for all iOS projects. It contains all the compiler information (header search paths, dependencies, list of source file dependencies, compiler flags and configurations, and device metadata) and frequently changes when an iOS developer makes changes to the iOS project (anything from modifying compiler flags, adding third-party dependencies, and even just creating a new swift file in the project). Naturally, this file becomes massive for any medium sized app because of all the things it is tracking.

We need to frequently go through the process of checking this file in and resolving merge conflicts (sometimes manually). If we check this into LFS, we lose the ability to do so. This means engineers will frequently be merging broken iOS commits, so it's important we track this file using version control. This file is a one-off exception to our rule about large file sizes.

@ppremk
Copy link
Owner

ppremk commented Aug 4, 2021

@brenmcnamara thank you for the explanation, it is clear, we could add an input to collect a list of exception of files or its extension as suggested by @naseemkullah .. I am thinking along the line of:

excludefile:  # file name or extension 
    description: 'file to be excluded from the check'
    required: false
    default: '.pbxproj' 

would that work for you folks? 🙂

@brenmcnamara
Copy link

Looks good to me! @naseemkullah ?

@naseemkullah
Copy link
Collaborator Author

naseemkullah commented Aug 5, 2021

sounds great! 🙏

one thing is I think the input should be a list of glob patterns to match files for maximum flexibility, if passing in extension/filename directly we might hit some edge cases, such as a very large dotfile

@naseemkullah naseemkullah mentioned this issue Aug 8, 2021
Merged
@naseemkullah naseemkullah changed the title file inclusions/exclusions file exclusions Aug 15, 2021
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 a pull request may close this issue.

3 participants