Skip to content

Commit f806547

Browse files
committed
remove the requirement to sort the dict file. It's creating conflicts in lot of PRs. And adding a check for duplicated entries
1 parent 00da39c commit f806547

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.pre-commit-config.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ repos:
99
hooks:
1010
- id: pospell
1111
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES', '--language', 'es_AR']
12-
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v2.5.0
14-
hooks:
15-
- id: file-contents-sorter
16-
files: dict

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ install:
1111
script:
1212
- powrap --check --quiet **/*.po
1313
- pospell -p dict -l es_AR -l es_ES **/*.po
14+
- make dict_dups
1415
- make build
1516
branches:
1617
only:

Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ help:
3131
@echo " spell Check spelling"
3232
@echo " wrap Wrap all the PO files to a fixed column width"
3333
@echo " progress To compute current progression on the tutorial"
34+
@echo " dict_dups Check duplicated entries on the dict"
3435
@echo ""
3536

3637

@@ -94,3 +95,17 @@ spell: venv
9495
.PHONY: wrap
9596
wrap: venv
9697
$(VENV)/bin/powrap **/*.po
98+
99+
.PHONY: dict_dups
100+
SHELL:=/bin/bash
101+
.ONESHELL:
102+
dict_dups:
103+
if [[ $$(cat dict| sort | uniq -dc) ]]; then\
104+
echo -e "\n\n\n ####################### \n\n\n"
105+
echo "duplicated lines in the dict file"
106+
uniq -dc dict
107+
exit 1
108+
else
109+
echo "no duplicated lines"
110+
exit 0
111+
fi

0 commit comments

Comments
 (0)