zeek / zeek/zeekscript

Formatting of "print" statements

Open
#31 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

This is a very minor issue and maybe one that's better addressed using a style guide (which I have for Corelight use), I'm fine with that being the resolution. Same applies to the next issue I'm going to file.

The request is to remove unnecessary parens in print statements. I've noticed that some script writers treat print like a function call, so they'll do things like:

print (foo);

Is it reasonable for zeek-format to change that to:

print foo;

?

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 locating the zeek-format formatter entry point and the handling of print statements. Check how expressions such as print (foo); are parsed and formatted. Done means the formatter consistently removes unnecessary parentheses while preserving valid print syntax, with relevant tests updated or added.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.