8000 remove the requirement to sort the dict file. by gilgamezh · Pull Request #360 · python/python-docs-es · GitHub
[go: up one dir, main page]

Skip to content

remove the requirement to sort the dict file. #360

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

Merged
merged 2 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove the requirement to sort the dict file. It's creating conflicts…
… in lot of PRs. And adding a check for duplicated entries
  • Loading branch information
gilgamezh committed May 24, 2020
commit f806547fd4117aed51ed2ca2f695363fe1f6ec17
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ repos:
hooks:
- id: pospell
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES', '--language', 'es_AR']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: file-contents-sorter
files: dict
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ install:
script:
- powrap --check --quiet **/*.po
- pospell -p dict -l es_AR -l es_ES **/*.po
- make dict_dups
- make build
branches:
only:
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ help:
@echo " spell Check spelling"
@echo " wrap Wrap all the PO files to a fixed column width"
@echo " progress To compute current progression on the tutorial"
@echo " dict_dups Check duplicated entries on the dict"
@echo ""


Expand Down Expand Up @@ -94,3 +95,17 @@ spell: venv
.PHONY: wrap
wrap: venv
$(VENV)/bin/powrap **/*.po

.PHONY: dict_dups
SHELL:=/bin/bash
.ONESHELL:
dict_dups:
if [[ $$(cat dict| sort | uniq -dc) ]]; then\
echo -e "\n\n\n ####################### \n\n\n"
echo "duplicated lines in the dict file"
uniq -dc dict
exit 1
else
echo "no duplicated lines"
exit 0
fi
0