From d448fecc88c20965bf5dbab2a0dfc6e70d2750b1 Mon Sep 17 00:00:00 2001 From: erwann lesech Date: Mon, 15 Jan 2024 22:02:02 +0100 Subject: [PATCH 1/2] doc: add some important content in README --- README.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d66565f2..5cb11a7c 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,17 @@ - [Installation](#installation) - [Usage](#usage) +- [Features](#features) - [Contributing](#contributing) +- [Contious Integration](#continuous-integration) ## Installation ```sh -git clone -cd -make +git clone git@github.com:ErwannLesech/42-Sh.git +cd 42-Sh +./42-install +cd src ``` ## Usage @@ -51,6 +54,42 @@ $ ./42sh --logger # Print some informations during process $ ./42sh --pretty-print # Print the parser AST ``` +In case of `pretty-print` option, a `.gv` file is generated. To convert it to a `.png` to visualise the ast, here is the line: + +```sh +dot -Tpng pretty_print.gv -o ast.png +display ast.png +``` + +## Features + +In the 42sh project, our primary objective was to implement a comprehensive set of POSIX features. + +These features include, but are not limited to, what follows : + +*Each step represents every week working on the project.* + +### Step 1 + +- **Conditionnal operators** (if, elif, else, fi) +- **Commands list** (echo ; ls) +- **Single quote strings** (echo 'It is an \\'exemple\\'') +- **Comments** (echo exem# it is a comment) +- **Simple commands** (echo, ls, cat, tr, ...) +- **Simple builtins** (true, false, echo -enE) + +### Step 2 + +- **Redirections** (>, <, >>, >&, <&, >|, <>) +- **Pipes** (echo dad | tr a e) +- **Negation** (! true) +- **Basic loops** (while, until) +- **Operators** (&&, ||) +- **Double quote strings** (echo "This variable $a is an amount in \$") +- **Variables** (a=2, $a, $#, $*, $RANDOM, $UID, $IFS, ...) +- **For loops** + + ## Contributing All contributions are done by doing a merge request when you are done working on your own branch @@ -105,3 +144,19 @@ fix(http_parser): use the correct HTTP response code for wrong version Use the HTTP error 405 instead of 400 if the request contains an unsupported HTTP version. ``` + +## Continuous Integration + +Powered by LESECH Erwann. + +At every `push/pull_request` to `master` and `dev`, the CI is executed to check some rules and deploy the result to gh-pages. + +Here are main rules to respect in order to check the CI program: + +- `configure.ac` and `Makefile.am` are used to compile and run the testsuite of 42Sh. + +- `.clang-format` is used to diff the whole project and check if it's clang-format compliant. + +- `github/workflows/clang_tidy.sh` is a shell script that verify if the 42Sh is clang-tidy compliant. + +- `Doxyfile` must be pushed to be used with `doxygen` in order to generate the documentation. \ No newline at end of file From 0ea9703035558944666a0253b7d016906e9f4746 Mon Sep 17 00:00:00 2001 From: erwann lesech Date: Tue, 16 Jan 2024 13:14:29 +0100 Subject: [PATCH 2/2] fix: fix extension script name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54361bad..0ddaf7fa 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ```sh git clone git@github.com:ErwannLesech/42-Sh.git cd 42-Sh -./42-install +./42-install.sh cd src/ ```