Skip to content
Snippets Groups Projects

Draft: add --strict check

Closed Jiří Pudil requested to merge strict-check into master
3 unresolved threads

closes #3 (closed), replaces !10 (closed)

Snímek_obrazovky_2021-11-25_v_14.29.04

Edited by Jiří Pudil

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jiří Pudil requested review from @jkuchar1

    requested review from @jkuchar1

  • assigned to @jpudil

    • Vubec mi nesedi ten nazev strict.

    • Mrknu na to jeste poradne na pocitaci zitra.

    • Author Maintainer

      Sémanticky to navazuje na změny, které jsem dělal v outputu a v error handlingu – scaffolder s touhle úpravou co nejvíc granulárně chytá pokémony, takže při každém spuštění projde, zkontroluje a vygeneruje úplně všechny definice.

      Název přepínače je určitě otevřen diskuzi, taky si tím nejsem vůbec jistý. Ale bude potřeba najít vhodný kompromis mezi stručností (--strict) a srozumitelností (--fail-on-changes-that-would-be-lost).

    • Author Maintainer

      Alternativní nápad: tohle striktní chování by mohlo být výchozí a přepínač by pak mohl být --force|-f :thinking:

    • Ta myšlenka byla původně jiná. Spíše něco ve smyslu scaffolder check-consistency. Tj. že to vůbec není pro uživatele, který si omylem něco přepíše, ale pro CI, kde to jednoduše failne a řekne, které soubory jsou nekonsistentní s definition files.

      Myšlenka, že mi scaffolder řekne, v kterých souborech jsem dělal ruční změny a budou smazány mi přijde super, ale myslím, že to tím pádem vyžaduje uložit nějaký checksum, který teď nikde nemáme. :) Možná raději zavolej a domluvíme se, co s tím. :)

    • Nápad s --force|-f mi přijde fajn! Ještě projdu jednou kód a dám vědět. Klidně si zavolejme a projděme to.

    • Please register or sign in to reply
359
360 public function addDefinition(DefinitionResult $definitionResult): void
361 {
362 $this->definitions[] = $definitionResult;
363 }
364
365 /**
366 * @return DefinitionResult[]
367 */
368 public function getDefinitions(): array
369 {
370 return $this->definitions;
371 }
372 }
373
374 final class DefinitionResult
  • 314 return;
    315 }
    316
    317 if (\is_string($exceptionFile)) {
    318 $cwd = \getcwd();
    319 \assert(\is_string($cwd));
    320
    321 $output->writeln(\sprintf(
    322 'Error was logged in %s',
    323 Path::makeRelative($exceptionFile, $cwd),
    324 ));
    325 }
    326 }
    327 }
    328
    329 final class FileResult
  • Jiří Pudil mentioned in merge request !52 (merged)

    mentioned in merge request !52 (merged)

  • Jiří Pudil added 1 commit

    added 1 commit

    • 3e4ef346 - make result classes internal

    Compare with previous version

  • Jiří Pudil added 2 commits

    added 2 commits

    Compare with previous version

  • Jiří Pudil marked this merge request as draft

    marked this merge request as draft

  • Jiří Pudil changed title from Add --strict check + more informative error output to Draft: add --strict check

    changed title from Add --strict check + more informative error output to Draft: add --strict check

  • Author Maintainer

    Zavírám, toto není správná cesta, ta jest prokopána v !53 (merged)

  • closed

  • Please register or sign in to reply
    Loading