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

Insert Dredd declarations at very start of file #199

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Insert Dredd declarations at very start of file #199

merged 2 commits into from
Nov 22, 2023

Conversation

afd
Copy link
Member

@afd afd commented Nov 22, 2023

Rather than looking for the first declaration in the file and inserting Dredd declarations before that, declarations are now inserted at the very beginning of the source file being mutated. This means that they even precede preprocessor directives and comments. This fixes an issue where declarations were being placed at invalid positions in the presence of certain uses of preprocessor directives.

Fixes #198.

afd added 2 commits November 22, 2023 07:13
Rather than looking for the first declaration in the file and
inserting Dredd declarations before that, declarations are now
inserted at the very beginning of the source file being mutated. This
means that they even precede preprocessor directives and comments. This
fixes an issue where declarations were being placed at invalid
positions in the presence of certain uses of preprocessor directives.

Fixes #198.
@afd afd merged commit 0ed6b30 into main Nov 22, 2023
9 checks passed
@afd afd deleted the fix-198 branch November 22, 2023 08:26
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.

DREDD generate invalid code by injecting snippet between function declaration
1 participant