8000 Add a rule about cache definition language string being required for any new cache · Issue #194 · moodlehq/moodle-cs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a rule about cache definition language string being required for any new cache #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aspark21 opened this issue Feb 12, 2025 · 1 comment

Comments

@aspark21
Copy link
aspark21 commented Feb 12, 2025

This is an easy one to miss and hopefully simple to add.

This throws a warning in our full build tests but it would be preferable if it could be caught earlier by moodle-plugin-ci / moodle-cs before code gets merged

e.g.

Given I navigate to "Plugins > Caching > Configuration" in site administration: debugging() message/s found:
String does not exist. Please check your string definition for cachedef_mappingmabinfo/local_sitsgradepush

@marinaglancy
Copy link
Member

There are quite a few places where moodle expects a string with a magic name to be present:

  • capabilities definitions in db/access.php
  • caches definitions in db/caches.php
  • message provider name in db/messages.php
  • tag collection name in db/tag.php
  • mnet publishers in db/mnet.php
  • strings used in the addons in db/mobile.php
  • names for the subplugin types if db/subplugins.json is present

As well as a lot of other places where string identifiers are returned/passed as parameters to the functions other than get_string - search areas, grade items, privacy providers, exceptions, and so on.

There has been a lot of work to identify all these places in https://mdlcode.dev extension for VSCode and it already raises "missing string" problems in all of these places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0