zeek / zeek/zeekscript

Sanity check: Ensure AST hasn't changed

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11
Forks
4
Avg merge
3d 19h
Merged PRs (30d)
1

Description

Black has some interesting thoughts about checking that the AST hasn't changed after re-formatting to ensure that the code is semantically equivalent: https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#ast-before-and-after-formatting

Reformatting shouldn't introduce semantic changes, so I think this would be more of a double-check on the correctness of zeekscript itself.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Black documentation on comparing ASTs before and after formatting, then inspect zeekscript's parser, analyzer, and formatter entry points. No files or tests are named in the issue, so completion would require defining the comparison approach and adding coverage that demonstrates formatting preserves semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.