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

Use 1-indexed line numbers when displaying error messages #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olivia-fl
Copy link

The line numbers stored in the ParseError struct are 0-indexed, which is reasonable as an internal representation but very confusing in displayed error messages.

Example

with the following resolv.conf file:

nameserver 192.168.1.1
options no-aaaa

The current code shows the error

error: option at line 1 is not recognized

After this change, the error is

error: option at line 2 is not recognized

The line numbers stored in the ParseError struct are 0-indexed, which is
reasonable as an internal representation but very confusing in displayed
error messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant