ryanbthomas/hazmat

Ignore Comments

Opened this issue · 2 comments

Currently scan_file includes lines where hazards are in comments, which may not be necessary.

Questions:

  1. Can this be done by just modifying the regexp used?
  2. Does it require a secondary step to test from presence of a '#'

Possible implementation:

add ignore_comments argument to scan_file function / which would be passed in turn to identify_hazard. If true, then identified lines are scanned for a comment '#' which proceeds the hazard.

This implementation seems simpler than trying to update the regexp to have a negative look-behind.