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

Configsyntax #37

Merged
merged 19 commits into from
Dec 1, 2023
Merged

Configsyntax #37

merged 19 commits into from
Dec 1, 2023

Conversation

Tentanus
Copy link
Collaborator

I've written a small syntax checker for the configfile.
It checks for the following:

  • If blocks are closed
  • if a KEY has at least one VALUE
  • if a KEY:VALUE pair is delimited with a ';'

TO DO

  • check the request_target/directory of a location block

@Tentanus Tentanus added the 💫enhancement New feature or request label Nov 20, 2023
Copy link
Owner

@saladuit saladuit left a comment

Choose a reason for hiding this comment

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

There are some small things, but generally I'm proud of your growth in your cpp coding. It is very readable and well structured. I applaud your progress! Please take a look at my comments. All question marks are genuine questions that I couldn't figure out from just reading it. Lastly, You're doing well with throwing errors, The only thing I'm missing is the way you want to handle it. If you wan't to exit the program with all of your runtime error's you should leave it as is. (only change the mesaging a bit). If you do want to continue, (for example when a directive is overwritten, consider making a "DuplicateEntryException" class, so that you can catch it gracefully, log the warning and continue parsing, It is up to you though!

include/ConfigParser.hpp Outdated Show resolved Hide resolved
src/ConfigSyntax.cpp Outdated Show resolved Hide resolved
src/ConfigSyntax.cpp Outdated Show resolved Hide resolved
src/ServerSettings.cpp Outdated Show resolved Hide resolved
Copy link
Owner

@saladuit saladuit left a comment

Choose a reason for hiding this comment

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

Good usage of the overwriting warnings!

@saladuit saladuit merged commit 1e5d0eb into main Dec 1, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💫enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants