Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove some of the unused definitions from synapse #288

Merged
merged 24 commits into from
Sep 28, 2015

Conversation

NegativeMjark
Copy link
Contributor

Add a script for finding unused definitions by walking the AST looking for names that only appear in definitions.

Remove some of the stuff that the script picked up on as being unused.

To find the unused definitions run the script with

./scripts-dev/definitions.py --unused synapse scripts scripts-dev --ignore "build_.*" --ignore "__.*__" --ignore "render_(GET|OPTIONS|POST|PUT)"

The output needs to be taken with a pinch of salt since it will generate false positives for functions used by twisted or functions invoked by looking up the function using a string, e.g. render_GET.

Mark Haines added 24 commits September 22, 2015 18:13
@erikjohnston
Copy link
Member

LGTM

NegativeMjark added a commit that referenced this pull request Sep 28, 2015
Remove some of the unused definitions from synapse
@NegativeMjark NegativeMjark merged commit 3011415 into develop Sep 28, 2015
@erikjohnston erikjohnston deleted the markjh/unused_definitions branch November 19, 2015 17:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants