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

Update backend.py #970

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/blade/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
# NOTE the `$$` is required by ninja. and the `Multiple...` is the last and useless part of
# the messages.
_INCLUSION_STACK_SPLITTER = (r"awk '"
r"""/Multiple include guards may be useful for:/ {stop=1} """ # Can't exit here otherwise SIGPIPE maybe occurs.
r"""/^\.+ [^\/]/ { print $$0} """ # Non absolute path
r"""!/^\.+ / && !stop {print $$0 > "/dev/stderr"}""" # Maybe error messages
r"'"
r"""/Multiple include guards may be useful for:/ {stop=1} """ # Can't exit here otherwise SIGPIPE maybe occurs.
Copy link
Owner

Choose a reason for hiding this comment

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

over indented space

r"""/^\.+ [^\/]/ && !stop { print $$0} """ # Non absolute path
r"""!/^\./ && !/^\// && !/Multiple include guards may be useful for:/ {print $$0 > "/dev/stderr"}""" # Maybe error messages
Copy link
Owner

Choose a reason for hiding this comment

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

Suggest using the next command in the first line to avoid matching it again.

r"'"
)

def _incs_list_to_string(incs):
Expand Down