Skip to main content

Submission For Dummies

Build

As you may have guessed, the first step before submitting your project is to make sure your project builds (and your code compiles).

Some of the steps to check this are:

  1. Following the compilation instructions closely in the project's subject.
  2. Run make distcheck. This makes sure that your package is ready to be distributed. If this command succeeds, your code will most likely compile on our side (unless you do not follow other rules such as which dependencies are allowed).

Clang Format

You must make sure your code is formatted correctly. You can format your entire repository by running the following command at the root of your repository:

find . -name "*.[ch]" -exec clang-format -i {} \;

Make sure the .clang-format file is located at the root of your repository.

Clang Tidy

Refer to the clang-tidy restrictions described in the EPITA Coding Style.

The only exceptions during 42sh are the following:

  • Functions can be as long as 40 lines.
  • The use of the goto keyword is allowed for error handling ONLY.
  • The use of explicit casts is allowed.

Trash Files

Make sure your submission does not contain any trash files. You can use the following command to list all the files tracked by git:

git ls-files

If any of these are trash files, you can remove them with the following command:

# If they are not tracked by git
git clean -fdX

# If they are tracked by git
git rm [-rf] <file> # Then, you must commit the changes

Refer to the FAQ to know which files are not considered trash files.

Pushing a Tag

It may come as a surprise, but you must also push a tag. This is done with the following command:

git tag -a <tag_name> -m <tag_message>
git push --follow-tags