check:vendor

Finds Keenthemes code, the Metronic theme and its icons, in the active product and in the features it declares. Metronic is a commercial theme whose licence does not allow redistributing it, so neither a product of the line nor a feature any product can pin may carry it. A feature written against it also breaks as soon as the product that ships Metronic’s files drops them: its icons go blank and its scripts call globals nobody defines.


Example

splent check:vendor
splent check:vendor --warn   # report, exit 0, while a product moves off it
splent check:vendor --all    # every file, not the first ten of each place
  check:vendor  my_first_app
  ------------------------------------------------------------
  splent_feature_explore@v0.1.1  (src/)
    ✗ splent_io/splent_feature_explore/assets/js/header_search.js:2  ki-duotone, data-kt- (6 matches)
    ✗ splent_io/splent_feature_explore/hooks.py:21  ki-duotone (1 match)
    ✗ splent_io/splent_feature_explore/templates/explore/index.html:26  ki-duotone, data-kt- (10 matches)
  splent_feature_rating@v0.1.0  (src/)
    ✗ splent_io/splent_feature_rating/templates/rating/_rating_widget.html:10  ki-duotone (4 matches)

  ✗ 4 files with Keenthemes code, in 2 features
    Replace it with Bootstrap, feather icons or code of your own. In a feature, that takes a release the product then pins.

Each line gives the file, the first line with a match, the patterns found and how many matches. With nothing found it ends with ✅ No Keenthemes code in <product> or its <n> features.

Options

Option Description
--warn Report what is found and exit 0, while a product moves off Keenthemes. The findings are marked ⚠️ instead of ✗.
--all List every file found. Without it each place lists ten files and counts the rest, … and <n> more files (--all lists them).

What it looks for

The code is found by what it contains, wherever it sits.

Pattern What it is
KTUtil, KTComponents, KTApp, KTMenu, KTStepper The globals Metronic’s JavaScript defines, matched at the start of a word
ki-duotone, ki-outline, ki-solid The classes of its icon font, Keenicons
data-kt- Its data attributes
keenthemes, Metronic The names, in any case, Metronic as a whole word

Duotune, Keenthemes’ SVG icon set, carries no mark of its own in its files, so a file whose path names duotune, keenicons, keenthemes or metronic is reported too, as duotune in its path.

Where it looks

Place What is searched
The product Its whole tree, except features/, the links product:resolve makes, and instance/ and uploads/, which the app writes while it runs
Each feature the product declares, in features, features_dev and features_prod The src/ of the copy the product runs, the release it pins or the working copy of an editable one

Everywhere, tests/ is left out, since a test may name the patterns it guards against, and so are node_modules/, __pycache__/, hidden folders such as .git, and binary files (images, fonts, archives, and any file with a NUL byte). A feature with no local copy is not searched, and the output says so with ℹ️ Not searched, no local copy: <features>.

It exits 1 when anything is found, 0 otherwise or with --warn.

In continuous integration

The validate job of splent-validate.yml runs splent check:vendor, without --warn, after resolving the features of both environments, so the product and every feature it pins are searched (see Continuous integration). A workflow an older CLI wrote gets the step when it is written again, by product:sync-template --ci or by a command that changes what it renders (see Keeping the workflows in step). From then on a product still moving off Keenthemes fails there until the last file is gone, from the product and from the releases it pins, so write it again once splent check:vendor passes where the product runs.

Requirements

  • An active product (SPLENT_APP).
  • The features resolved, splent product:resolve, so each one has a local copy to search.

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es