krzysztofzablocki/Sourcery

Ignore code marked as such by the preprocessor / Swift Active Compilation Conditions

オープン

#500 opened on 2018/01/23

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Swift (635 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (8,017 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Many projects use swift preprocessor directives / active compilation conditions to enable conditional compilation. (e.g. lines surrounded by an if/ifdef/ifndef directive that should only compile when their condition – usually an environment variable – evaluates to true.)

As far as I can tell, Sourcery appears not to be aware of these markers and therefore blocks of code marked to be ignored are still processed by Sourcery – leading to compilation errors.

Searching the source code I see that the Source Kitten dependency may expose those lines of code which should be ignored so this may be something that could be added relatively simply?

コントリビューターガイド