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

Bash: check for duplicate lines in the dictionary file #84

Open
DenverCoder1 opened this issue Oct 3, 2022 · 2 comments
Open

Bash: check for duplicate lines in the dictionary file #84

DenverCoder1 opened this issue Oct 3, 2022 · 2 comments

Comments

@DenverCoder1
Copy link
Owner

The dictionary should not contain the same shortcut twice. As a linting feature, it can be made to check if a shortcut appears more than once. Checking for entire line duplicates should be sufficient.

Relevant file: https://github.com/DenverCoder1/latex-gboard-dictionary/blob/master/.github/lint

@hhliu0
Copy link

hhliu0 commented Sep 14, 2023

I can work on this! I'd like to extend it beyond entire line duplicates tho, to also check for conflicting shortcuts. When one is found, would I just flag it? Or could my program ask for an (optional) alternative shortcut for one of them? For example, \Rightarrow on lines 384 and 547 conflict, ⇒ vs ⟹. I believe ⟹ should be assigned to \implies instead. Or \phi as both φ and ϕ; the latter should be reassigned to \varphi.

@DenverCoder1
Copy link
Owner Author

Sounds great!

The lint script should exit with a non-zero exit code if a problem is found in order for the Check to fail.

Any additional context you can add to the output would be great. Outputting which line(s) have the problem would definitely be nice. The program wouldn't be able to read in user input since it's running as a GitHub workflow in the background, but if you have ideas on how it could be improved feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants