TheAlgorithms / scripts

Scripts used across all The Algorithms repositories
MIT License
76 stars 43 forks source link

Create a script to check whether a given branch has any files that do not adhere to our contributions guidelines #18

Open tjgurwara99 opened 1 year ago

tjgurwara99 commented 1 year ago

For us to be able to finish the filename actions batch, we need to provide our script the capability of returning a list of filenames so that we can use those filenames to send PR annotations to a user.

The main parts of this script already exist, this issue is to track the idea of finding all the filenames that are incorrect and returning (outputting) to the caller.

tjgurwara99 commented 1 year ago

This is a blocker for #19 so let me know when you've finished work on this!

Panquesito7 commented 1 year ago

So, technically, all we need to do is return the list of filenames that do not match the guidelines, right? That shouldn't be too hard. We can modify the current script to do that and then implement it in #16 if wanted.

tjgurwara99 commented 1 year ago

Yes, but the problem with the current script is that it is not language agnostic - some languages have their own conventions and having this script means that those languages won't be supported by this script. So what I suggest is using something like tree-sitter to have those checks done dynamically based on languages and conventions defined per repository. The idea is to make this somewhat more general. I will try to create a proof of concept (sometime this month) for the Go or C++ language and design an interface for plugins that other languages can then use to build it 😄