Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linte les fichiers YAML/Python en incrémental #1135

Merged
merged 4 commits into from
Oct 1, 2018

Conversation

bonjourmauko
Copy link
Member

@bonjourmauko bonjourmauko commented Sep 25, 2018

Child of #372
Relates to #1039

  • Changement mineur.
  • Zones impactées : .circleci.
  • Détails :
    • Lint des test YAML en incrémental (yamllint).
    • Lint des fichiers Python en incrémental (flake8).

Ces changements :

  • Modifient des éléments non fonctionnels de ce dépôt (.circleci).

Quelques conseils à prendre en compte :


last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit

if ! changes=$(git diff-index --name-only --exit-code $last_tagged_commit -- "tests/*.yaml")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je crois que cette commande va aussi identifier les fichiers supprimés. L'option --diff-filter=ACM peut être utile.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, j'ajoute :

--diff-filter=ACMR

pour tester aussi les changements de nom.

@@ -5,6 +5,7 @@

- name: "Avant le 1er avril 2014, le montant de base de la PAJE est proprotionnel à la BMAF"
period: 2013-01

Copy link
Contributor

@Morendil Morendil Sep 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce que les lignes en trop doivent entraîner des erreurs de yamllint ? Il semble que le test n'a pas été déclenché en tout cas sur la CI. (edit je veux dire que le test a tourné mais n'a pas fait de KO.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait non ils ne déclenchent pas des erreurs. Je vais ajouter un test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capture d ecran 2018-09-25 a 14 24 47

@bonjourmauko
Copy link
Member Author

(rebasée)

@bonjourmauko bonjourmauko force-pushed the add-flake8-increment branch 3 times, most recently from 6cc3569 to 0dd2770 Compare October 1, 2018 19:05
@bonjourmauko bonjourmauko changed the title Lint les fichiers YAML et Python en incrémental Lint les fichiers YAML/Python en incrémental Oct 1, 2018
@bonjourmauko bonjourmauko changed the title Lint les fichiers YAML/Python en incrémental Linte les fichiers YAML/Python en incrémental Oct 1, 2018
@bonjourmauko bonjourmauko merged commit 5b9836a into master Oct 1, 2018
@bonjourmauko bonjourmauko deleted the add-flake8-increment branch October 1, 2018 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants