lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get warnings for unused parts of a file?


From: Omid Mo'menzadeh
Subject: How to get warnings for unused parts of a file?
Date: Tue, 14 Sep 2021 12:22:41 +0430

Hello all. This might be a weird thing to seek, but here is the scenario:
I have several files defining (but not using) different parts of the score, which other files use to construct several output types.

But the problem is the command `lilypond -l WARNING -o /path/to/file.ly` does not show a warning for the following example file:
ghigh = \relative c {
  \clef "treble_8"
  \time 4/4
  \voiceOne
  c2 |
}

It does, if I include the following part at the end of the file:
\book {
  \ghigh
}

But the problem is that when I include it in another file, I get an extra output!

A possible solution could look like an `if __name__ == "__main__"` clause in Python, but I don't know if we have a similar variable available in Lilypond.
Thanks in advance,
Omid

reply via email to

[Prev in Thread] Current Thread [Next in Thread]