Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commandes et processus

clerk build

Construit les fichiers ou les cibles clerk listés dans votre fichier clerk.toml. Cette commande est assez polyvalente, et peut être utilisée pour construire des fichiers spécifiques individuels dans n’importe lequel des backends autorisés par Catala (voir l’aide ci-dessous), mais nous conseillons de n’utiliser clerk build qu’avec des cibles correctement définies dans clerk.toml.

Les résultats de clerk build sont disponibles dans le répertoire _targets par défaut, si vous n’avez pas spécifié un autre répertoire cible dans clerk.toml. Chaque cible génère un ensemble de fichiers de code source dans les langages de programmation cibles, générés par le compilateur Catala à partir des fichiers de code source Catala. Veuillez vous référer au guide de compilation et déploiement pour plus d’exemples sur la façon d’utiliser clerk build et les artefacts résultants.

clerk build ‐‐help

NAME
       clerk-build - Build command for either individual files or clerk
       targets.

SYNOPSIS
       clerk build [OPTION]… [TARGET(S)]…

DESCRIPTION
       For individual files, and given the corresponding Catala module is
       declared, this can be used to build .ml, .cmxs, .c, .py files, etc.
       These files, along with their dependencies, are written into build-dir
       (by default _build). If a file with a catala extension is used as
       target, this compiles all its dependencies. The format of the targets
       is src-dir/BACKEND/file.ext. For example, to build a C object file
       from foo/bar.catala_en, one would run:

       clerk build foo/c/bar.o

       and the resulting file would be in _build/foo/c/bar.o. When given
       clerk targets, that are defined in a clerk.toml configuration file, it
       will build all their required dependencies for all their specified
       backends along with their source files and copy them over to the
       target-dir (by default _target).

       For instance, clerk build my-target will generate a directory
       target-dir/my-target/c/ that contains all necessary files to export
       the target as a self contained library. When no arguments are given,
       clerk build will build all the defined clerk targets found in the
       clerk.toml or the project's default targets if any.

ARGUMENTS
       TARGET(S)
           Clerk target(s) or individual file(s) to process

OPTIONS
       --autotest
           When compiling to the backends, enable the Catala --autotest
           option that runs an evaluation of test scopes (understood as
           scopes that need no input) and instruments their compiled version
           with assertions that the results match. This shouldn't be
           specified directly using --catala-opts=--autotest because that
           wouldn't guarantee that the necessary artifacts for interpretation
           are present.

       --build-dir=DIR (absent CLERK_BUILD_DIR env)
           Directory where intermediate compilation artifacts should be
           written. Defaults to '_build'.

       -c FLAG, --catala-opts=FLAG
           Option to pass to the Catala compiler. Can be repeated. If neither
           this nor --test-flags is specified, the flags for the different
           backends default to -O.

       --color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
           Allow output of colored and styled text. Use auto, to enable when
           the standard output is to a terminal, never to disable.

       --config=FILE
           Clerk configuration file to use, instead of looking up
           "clerk.toml" in parent directories.

       -d, --debug
           Prints debug information

       -e EXE, --exe=EXE
           Catala compiler executable.

       -I DIR, --include=DIR (absent CATALA_INCLUDE env)
           Make modules from the given directory available from everywhere.
           Several dirs can be specified by repeating the flag or separating
           them with ':'.

       --makeflags=FLAG (absent MAKEFLAGS env)
           Provides the contents of a MAKEFLAGS variable to pass on to Ninja.
           Currently recognizes the -i and -j options.

       -o FILE, --output=FILE
           FILE is the file that will contain the build.ninja file output. If
           not specified, the build.ninja file is set to
           /clerk.ninja in debug mode, and a temporary file
           otherwise

       --target-dir=DIR (absent CLERK_TARGET_DIR env)
           Directory where final compilation targets should be written.
           Defaults to '_target'.

       -W, --whole-program
           Use Catala --whole-program option when testing or executing Catala
           scopes.

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

       --version
           Show version information.

EXIT STATUS
       clerk build exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).

ENVIRONMENT
       These environment variables affect the execution of clerk build:

       CATALA_COLOR
           See option --color.

       CATALA_INCLUDE
           See option --include.

       CLERK_BUILD_DIR
           See option --build-dir.

       CLERK_TARGET_DIR
           See option --target-dir.

       MAKEFLAGS
           make-compatible flags handling. Currently recognizes the -i and -j
           options and forwards them through to Ninja.

SEE ALSO
       clerk(1)

clerk test

Découvre, construit et exécute les tests.

Exécuter les tests

clerk test peut être utilisé sans aucun argument à la racine d’un projet Catala, avec la sortie suivante :

$ clerk test
┏━━━━━━━━━━━━━━━━━━━━━━━━  ALL TESTS PASSED  ━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                    ┃
┃             FAILED     PASSED      TOTAL                           ┃
┃   files          0         37         37                           ┃
┃   tests          0        261        261                           ┃
┃                                                                    ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

La ligne tests de ce rapport compte le nombre de tests échoués et réussis. La ligne files affiche le nombre de fichiers où soit tous les tests passent, soit il y a au moins un test qui échoue.

Vous pouvez imprimer les détails sur les fichiers contenant des tests réussis et échoués avec le drapeau --verbose. De plus, il est possible d’exécuter la commande avec le drapeau --xml pour obtenir un rapport compatible JUnit.

Vous pouvez restreindre la portée des tests exécutés par clerk test en fournissant un autre argument :

  • clerk test <fichier> exécutera uniquement les tests dans <fichier> ;
  • clerk test <dossier> exécutera uniquement les tests à l’intérieur des fichiers dans <dossier> (ou ses sous-répertoires) ;
  • clerk test <cible> exécutera uniquement les tests liés à la construction <cible>.

Qu’utilise clerk test pour exécuter les tests ?

clerk test exécute les tests avec l’interpréteur Catala. Si votre déploiement utilise un backend spécifique, disons python, il est fortement recommandé d’inclure également une exécution de clerk test --backend=python dans votre CI. Avec cette option, clerk test exécute Python sur le code Python généré par le compilateur Catala. De cette façon, vous serez protégé de l’éventualité qu’un bug dans le backend que vous utilisez conduise à un résultat différent pour le même programme Catala. La confiance n’exclut pas de vérifier minutieusement !

Déclarer les tests

Catala supporte deux types distincts de tests, adaptés à des objectifs différents :

  • Les tests de champ d’application devraient être le moyen principal d’écrire des tests qui valident des résultats attendus sur un calcul donné. C’est la façon naturelle d’automatiser les commandes clerk run --scope=TestXxx que vous utilisez pour exécuter vos tests manuellement.
  • Les tests Cram fournissent un moyen d’exécuter des commandes catala personnalisées et de vérifier leur sortie sur stdout et stderr. Ils sont parfois utiles pour des besoins plus spécifiques, comme s’assurer que la bonne erreur est déclenchée dans une situation donnée.

La commande clerk test peut être exécutée sur n’importe quel fichier ou répertoire contenant des fichiers catala, traitera les deux types de tests et imprimera un rapport.

Tests de champ d’application

Un test de champ d’application est un champ d’application qui est marqué avec l’attribut “test” : écrivez simplement #[test] juste avant son mot-clé déclaration.

#[test]
déclaration champ d'application TestArrondiArgent:
  résultat resultat contenu argent

Il y a deux exigences pour un test de champ d’application :

  • Le champ d’application doit être public (déclaré dans une section ```catala-metadata) afin qu’il puisse être exécuté et vérifié dans des conditions réelles
  • Il ne doit nécessiter aucune entrée : seules les variables interne, résultat et contexte sont autorisées

La sortie attendue du test doit être validée avec des instructions assertion. Sans elles, la seule chose que le test validerait est que le calcul ne déclenche pas d’erreur.

champ d'application TestArrondiArgent:
  définition resultat égal à 100 € / 3
  assertion resultat = 33,33 €

Comme vu dans le tutoriel, un test de champ d’application prend presque toujours la forme d’un appel au vrai champ d’application que vous voulez tester, en lui fournissant des entrées spécifiques et un résultat attendu :

#[test]
déclaration champ d'application Test_CalculImpotRevenu_1:
  résultat calcul contenu CalculImpotRevenu

champ d'application Test_CalculImpotRevenu_1:
  # Définir le calcul comme CalculImpotRevenu appliqué à des entrées spécifiques
  définition calcul égal à
    résultat de CalculImpotRevenu avec {
      -- individu:
        Individu {
          -- revenu: 20 000 €
          -- nombre_enfants: 0
        }
    }
  # Vérifier que le résultat est comme attendu
  assertion calcul.impot_revenu = 4 000 €

Test Cram

Le test Cram (ou test CLI) fournit un moyen de valider la sortie d’une commande Catala donnée, ce qui peut être utile dans des scénarios d’intégration plus spécifiques. Il est inspiré par le système de test Cram, en ce sens qu’un seul fichier source inclut à la fois la commande de test et sa sortie attendue.

Par exemple, vérifier qu’une erreur se produit quand attendu ne peut pas être fait avec des tests de champ d’application, qui doivent réussir. Vous voudrez peut-être inclure des tests qui utilisent catala proof. Ou vous pourriez vouloir, pour un test simple, valider que la trace est exactement comme prévu. Pour cela, une section ```catala-test-cli doit être introduite dans le fichier source Catala. La première ligne commence toujours par $ catala , suivi de la commande Catala à exécuter sur le fichier actuel ; le reste est la sortie attendue de la commande ; de plus, si la commande s’est terminée avec une erreur, la dernière ligne affichera le code d’erreur.

```catala-test-cli
$ catala interpret --scope=Test --trace
[LOG] ☛ Definition applied:
      ─➤ tutoriel.catala_fr:214.14-214.25:
          │
      214 │   définition calcul égal à
          │              ‾‾‾‾‾‾
      Test
[LOG] →  CalculImpotRevenu.direct
   ...
[LOG]   ≔  CalculImpotRevenu.direct.résultat: CalculImpotRevenu { -- impot_revenu: 4 000,00 € }
[LOG] ←  CalculImpotRevenu.direct
[LOG] ≔  Test.calcul: CalculImpotRevenu { -- impot_revenu: 4 000,00 € }
┌─[RESULT]─ Test ─
│ calcul = CalculImpotRevenu { -- impot_revenu: 4 000,00 € }
└─
```

Lors de l’exécution de clerk test, la commande spécifiée est exécutée sur le fichier ou répertoire (tronqué à ce point). Si la sortie correspond exactement à ce qui est dans le fichier, les tests passent. Sinon, il échoue, et les différences précises sont affichées côte à côte.

Attention, les tests cram ne peuvent pas être utilisés pour tester le code généré par le backend ; donc clerk test --backend=... n’exécutera pas les tests cram.

test-scope

Notez que pour ces ```catala-test-cli, $ catala test-scope Test est un raccourci pour

$ catala interpret --scope=Test

De plus, ils permettent d’exécuter le test avec des drapeaux variables en utilisant le drapeau --test-flags de clerk run. Voir clerk test --help pour les détails.

Réinitialiser la sortie attendue d’un test cram

Si un test cram échoue, mais en raison d’une différence légitime (par exemple, un changement de numéro de ligne dans l’exemple ci-dessus), il est possible d’exécuter clerk test --reset pour mettre à jour automatiquement le résultat attendu. Cela fera immédiatement passer le test cram, mais les systèmes de gestion de versions et une revue de code standard mettront en évidence les changements.

clerk test --reset peut également être utilisé pour initialiser un nouveau test, à partir d’une section ```catala-test-cli qui ne fournit que la commande sans sortie attendue.

clerk test ‐‐help

NAME
       clerk-test - Scan the given files, directories or clerk targets for
       catala tests, build their requirements and run them all. If --backend
       is unspecified or interpret, both scope tests and CLI tests are run ;
       --reset can be used to rewrite the expected results of CLI tests to
       their current result. For any other --backend, CLI tests are skipped
       and scope tests are compiled to the specified backend with the catala
       option --autotest, and then run, ensuring the consistency of results.
       When clerk targets are provided, only their specifically defined tests
       will be executed.

SYNOPSIS
       clerk test [OPTION]… [TARGET(S)]…

ARGUMENTS
       TARGET(S)
           Clerk target(s), individual file(s) or folder(s) to process

OPTIONS
       --backend=BACKEND (absent=interpret)
           Run the program using the given backend. BACKEND must be one of
           interpret, ocaml, c, python, java

       --build-dir=DIR (absent CLERK_BUILD_DIR env)
           Directory where intermediate compilation artifacts should be
           written. Defaults to '_build'.

       -c FLAG, --catala-opts=FLAG
           Option to pass to the Catala compiler. Can be repeated. If neither
           this nor --test-flags is specified, the flags for the different
           backends default to -O.

       --color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
           Allow output of colored and styled text. Use auto, to enable when
           the standard output is to a terminal, never to disable.

       --config=FILE
           Clerk configuration file to use, instead of looking up
           "clerk.toml" in parent directories.

       -d, --debug
           Prints debug information

       --diff[=VAL] (default=) (absent CATALA_DIFF_COMMAND env)
           Use a standard diff command instead of the default side-by-side
           view. If no argument is supplied, the command will be patdiff if
           available or diff otherwise. A supplied argument will be used as
           diff command with arguments pointing to the reference file and the
           output file

       -e EXE, --exe=EXE
           Catala compiler executable.

       --failures
           Show details of files with failed tests only

       -I DIR, --include=DIR (absent CATALA_INCLUDE env)
           Make modules from the given directory available from everywhere.
           Several dirs can be specified by repeating the flag or separating
           them with ':'.

       --makeflags=FLAG (absent MAKEFLAGS env)
           Provides the contents of a MAKEFLAGS variable to pass on to Ninja.
           Currently recognizes the -i and -j options.

       -o FILE, --output=FILE
           FILE is the file that will contain the build.ninja file output. If
           not specified, the build.ninja file is set to
           /clerk.ninja in debug mode, and a temporary file
           otherwise

       -r, --reset
           Used with the `test` command, resets the test output to whatever
           is output by the Catala compiler.

       --short
           Don't display detailed test failures diff

       --summary
           Only display a summary of the test results

       --target-dir=DIR (absent CLERK_TARGET_DIR env)
           Directory where final compilation targets should be written.
           Defaults to '_target'.

       --test-flags[=FLAGS] (default=) (absent CATALA_TEST_FLAGS env)
           Flags to pass to the catala interpreter on catala test-scope
           tests. Comma-separated list. A subset may also be applied to the
           compilation of modules, as needed. WARNING: flag shortcuts are not
           allowed here (i.e. don't use non-ambiguous prefixes such as
           --closure for --closure-conversion) NOTE: if this is set, all cli
           tests that are not catala test-scope are skipped to avoid
           redundant testing.

       -v, --verbose
           Display the full list of tests that have been run

       -W, --whole-program
           Use Catala --whole-program option when testing or executing Catala
           scopes.

       --xml (absent CATALA_XML_REPORT env)
           Output the test report in JUnit-compatible XML format

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

       --version
           Show version information.

EXIT STATUS
       clerk test exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).

ENVIRONMENT
       These environment variables affect the execution of clerk test:

       CATALA_COLOR
           See option --color.

       CATALA_DIFF_COMMAND
           See option --diff.

       CATALA_INCLUDE
           See option --include.

       CATALA_TEST_FLAGS
           See option --test-flags.

       CATALA_XML_REPORT
           See option --xml.

       CLERK_BUILD_DIR
           See option --build-dir.

       CLERK_TARGET_DIR
           See option --target-dir.

       MAKEFLAGS
           make-compatible flags handling. Currently recognizes the -i and -j
           options and forwards them through to Ninja.

SEE ALSO
       clerk(1)

clerk ci

Scanne le projet et exécute toutes les actions possibles. Cela inclut l’interprétation de tous les tests catala et tests CLI (équivalent à l’exécution de la commande clerk test), et aussi, la construction de toutes les cibles clerk (équivalent à l’exécution de la commande clerk build) aux côtés de l’exécution de leurs tests contre tous leurs backends définis. Cette commande est utile pour l’exécution d’intégrations continues (CIs) où toutes les actions de construction et de test sont souvent destinées à être exécutées.

clerk ci ‐‐help

NAME
       clerk-ci - Scan the project and run all possible actions. This
       includes the interpretation of all catala tests and CLI tests
       (equivalent to running the clerk test command), and also, the build of
       all clerk targets (equivalent to running the clerk build command)
       alongside the execution of their tests against all their defined
       backend. This command is useful for the execution of continuous
       integrations (CIs) where all build and test actions are often meant to
       be executed. Run with --debug for the full log of events.

SYNOPSIS
       clerk ci [OPTION]…

OPTIONS
       --build-dir=DIR (absent CLERK_BUILD_DIR env)
           Directory where intermediate compilation artifacts should be
           written. Defaults to '_build'.

       -c FLAG, --catala-opts=FLAG
           Option to pass to the Catala compiler. Can be repeated. If neither
           this nor --test-flags is specified, the flags for the different
           backends default to -O.

       --color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
           Allow output of colored and styled text. Use auto, to enable when
           the standard output is to a terminal, never to disable.

       --config=FILE
           Clerk configuration file to use, instead of looking up
           "clerk.toml" in parent directories.

       -d, --debug
           Prints debug information

       --diff[=VAL] (default=) (absent CATALA_DIFF_COMMAND env)
           Use a standard diff command instead of the default side-by-side
           view. If no argument is supplied, the command will be patdiff if
           available or diff otherwise. A supplied argument will be used as
           diff command with arguments pointing to the reference file and the
           output file

       -e EXE, --exe=EXE
           Catala compiler executable.

       --failures
           Show details of files with failed tests only

       -I DIR, --include=DIR (absent CATALA_INCLUDE env)
           Make modules from the given directory available from everywhere.
           Several dirs can be specified by repeating the flag or separating
           them with ':'.

       -o FILE, --output=FILE
           FILE is the file that will contain the build.ninja file output. If
           not specified, the build.ninja file is set to
           /clerk.ninja in debug mode, and a temporary file
           otherwise

       --short
           Don't display detailed test failures diff

       --summary
           Only display a summary of the test results

       --target-dir=DIR (absent CLERK_TARGET_DIR env)
           Directory where final compilation targets should be written.
           Defaults to '_target'.

       --test-flags[=FLAGS] (default=) (absent CATALA_TEST_FLAGS env)
           Flags to pass to the catala interpreter on catala test-scope
           tests. Comma-separated list. A subset may also be applied to the
           compilation of modules, as needed. WARNING: flag shortcuts are not
           allowed here (i.e. don't use non-ambiguous prefixes such as
           --closure for --closure-conversion) NOTE: if this is set, all cli
           tests that are not catala test-scope are skipped to avoid
           redundant testing.

       -v, --verbose
           Display the full list of tests that have been run

       -W, --whole-program
           Use Catala --whole-program option when testing or executing Catala
           scopes.

       --xml (absent CATALA_XML_REPORT env)
           Output the test report in JUnit-compatible XML format

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

       --version
           Show version information.

EXIT STATUS
       clerk ci exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).

ENVIRONMENT
       These environment variables affect the execution of clerk ci:

       CATALA_COLOR
           See option --color.

       CATALA_DIFF_COMMAND
           See option --diff.

       CATALA_INCLUDE
           See option --include.

       CATALA_TEST_FLAGS
           See option --test-flags.

       CATALA_XML_REPORT
           See option --xml.

       CLERK_BUILD_DIR
           See option --build-dir.

       CLERK_TARGET_DIR
           See option --target-dir.

SEE ALSO
       clerk(1)

clerk run

Exécute l’interpréteur Catala sur les fichiers donnés, après avoir construit leurs dépendances. Le champ d’application à exécuter peut être spécifié en utilisant l’option -s.

Au moment de la rédaction, clerk run est restreint aux champs d’application qui ne nécessitent pas d’entrées, il est donc utilisé pour exécuter des tests de champ d’application.

Exemple

$ clerk run tests/tests_allocations_familiales.catala_fr -s Test1

clerk run ‐‐help

NAME
       clerk-run - Runs the Catala interpreter on the given files, after
       building their dependencies. The scope to be executed can be specified
       using the -s option.

SYNOPSIS
       clerk run [OPTION]… [FILE]…

ARGUMENTS
       FILE
           File(s) or folder(s) to process

OPTIONS
       --backend=BACKEND (absent=interpret)
           Run the program using the given backend. BACKEND must be one of
           interpret, ocaml, c, python, java

       --build-dir=DIR (absent CLERK_BUILD_DIR env)
           Directory where intermediate compilation artifacts should be
           written. Defaults to '_build'.

       -c FLAG, --catala-opts=FLAG
           Option to pass to the Catala compiler. Can be repeated. If neither
           this nor --test-flags is specified, the flags for the different
           backends default to -O.

       --color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
           Allow output of colored and styled text. Use auto, to enable when
           the standard output is to a terminal, never to disable.

       --command=CMD (absent=interpret)
           The catala command to run on the input files. Normally interpret,
           this flag can be used to run typecheck or a custom plugin instead.
           This is ignored if --backend isn't interpret.

       --config=FILE
           Clerk configuration file to use, instead of looking up
           "clerk.toml" in parent directories.

       -d, --debug
           Prints debug information

       -e EXE, --exe=EXE
           Catala compiler executable.

       -I DIR, --include=DIR (absent CATALA_INCLUDE env)
           Make modules from the given directory available from everywhere.
           Several dirs can be specified by repeating the flag or separating
           them with ':'.

       --makeflags=FLAG (absent MAKEFLAGS env)
           Provides the contents of a MAKEFLAGS variable to pass on to Ninja.
           Currently recognizes the -i and -j options.

       -o FILE, --output=FILE
           FILE is the file that will contain the build.ninja file output. If
           not specified, the build.ninja file is set to
           /clerk.ninja in debug mode, and a temporary file
           otherwise

       --prepare-only
           Compile dependencies of the target(s) but do not run it.

       -s SCOPE, --scope=SCOPE
           Used with the `run` command, selects which scope of a given Catala
           file to run.

       --target-dir=DIR (absent CLERK_TARGET_DIR env)
           Directory where final compilation targets should be written.
           Defaults to '_target'.

       -W, --whole-program
           Use Catala --whole-program option when testing or executing Catala
           scopes.

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

       --version
           Show version information.

EXIT STATUS
       clerk run exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).

ENVIRONMENT
       These environment variables affect the execution of clerk run:

       CATALA_COLOR
           See option --color.

       CATALA_INCLUDE
           See option --include.

       CLERK_BUILD_DIR
           See option --build-dir.

       CLERK_TARGET_DIR
           See option --target-dir.

       MAKEFLAGS
           make-compatible flags handling. Currently recognizes the -i and -j
           options and forwards them through to Ninja.

SEE ALSO
       clerk(1)

clerk clean

Supprime les fichiers et répertoires précédemment générés par clerk, notamment le répertoire _build et _targets. Utile pour nettoyer la machine après un travail CI ou pour s’assurer que vous n’incluez pas de fichiers périmés et anciens dans votre pipeline de construction.

clerk clean ‐‐help

NAME
       clerk-clean - Removes files and directories previously generated by
       clerk if any.

SYNOPSIS
       clerk clean [OPTION]…

OPTIONS
       --build-dir=DIR (absent CLERK_BUILD_DIR env)
           Directory where intermediate compilation artifacts should be
           written. Defaults to '_build'.

       -c FLAG, --catala-opts=FLAG
           Option to pass to the Catala compiler. Can be repeated. If neither
           this nor --test-flags is specified, the flags for the different
           backends default to -O.

       --color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
           Allow output of colored and styled text. Use auto, to enable when
           the standard output is to a terminal, never to disable.

       --config=FILE
           Clerk configuration file to use, instead of looking up
           "clerk.toml" in parent directories.

       -d, --debug
           Prints debug information

       -e EXE, --exe=EXE
           Catala compiler executable.

       -I DIR, --include=DIR (absent CATALA_INCLUDE env)
           Make modules from the given directory available from everywhere.
           Several dirs can be specified by repeating the flag or separating
           them with ':'.

       -o FILE, --output=FILE
           FILE is the file that will contain the build.ninja file output. If
           not specified, the build.ninja file is set to
           /clerk.ninja in debug mode, and a temporary file
           otherwise

       --target-dir=DIR (absent CLERK_TARGET_DIR env)
           Directory where final compilation targets should be written.
           Defaults to '_target'.

       -W, --whole-program
           Use Catala --whole-program option when testing or executing Catala
           scopes.

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

       --version
           Show version information.

EXIT STATUS
       clerk clean exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).

ENVIRONMENT
       These environment variables affect the execution of clerk clean:

       CATALA_COLOR
           See option --color.

       CATALA_INCLUDE
           See option --include.

       CLERK_BUILD_DIR
           See option --build-dir.

       CLERK_TARGET_DIR
           See option --target-dir.

SEE ALSO
       clerk(1)