Comments (1)
Something kinda fun -- looking for "strong" language in the comments. This grabs all the comments from the code and passes it through a language checker, and sorts by the most offensive to the least.
$ rg --pcre2 '(?<!SELECT)(// |^ *\*(?!/))(?! Copyright|.*Apache|.*eslint)' | profanity.py | sort -r
0.168: tests/versioned/mysql2/promises.tap.js: // Perform the setup using the callback API.
0.156: CHANGELOG.md:* Enforces supported Node versions (aligns with agent).
0.139: tests/versioned/common/basic-pool.js: // wrap the callback multiple times.
0.123: tests/versioned/common/basic-pool.js: // this is to avoid tests that 'happen' to work because of how CLS works
0.107: tests/versioned/mysql2/promises.tap.js: // It is important to keep this setup code inside the callback to trigger
0.107: tests/versioned/common/basic-pool.js: // localhost the data will still be correctly associated
0.104: CHANGELOG.md:* Removed more items from the published package.
0.103: CHANGELOG.md:* Replaced deep-link into agent to retrieve database name with call to
0.102: tests/versioned/common/basic-pool.js: // The domain socket tests should only be run if there is a domain socket
0.097: tests/versioned/common/setup.js: // ignore that error.
0.095: tests/versioned/mysql2/promises.tap.js: // Stub the normal mysql2 instrumentation to avoid it hiding issues with the
0.090: tests/versioned/common/basic-pool.js: // TODO: test notice errors
0.089: tests/versioned/common/basic-pool.js: // make sure a connection exists in the pool before any tests are run
0.087: tests/versioned/common/pooling.js: // (since it has not finished executing)
0.084: CHANGELOG.md:* Updated test utilities library and stopped deep linking into the agent.
0.083: tests/versioned/common/basic-pool.js: // the same box as these tests. This should always be the case on Travis,
0.082: tests/versioned/common/transactions.js: // set up the instrumentation before loading MySQL
0.081: tests/versioned/common/basic-pool.js: // with the query.
0.081: CHANGELOG.md:* Updates tests to make agent v5 compatible.
0.080: tests/versioned/common/basic-pool.js: // In the case where you don't have a server running on
0.080: tests/versioned/common/basic-pool.js: // In the case where you don't have a server running on localhost
0.080: CHANGELOG.md:* Added support for Node v12.
0.079: tests/versioned/common/pooling.js: withRetry.release(client) // always release back to the pool
0.079: CHANGELOG.md:* **BREAKING** Removed support for Node 6, 7, and 9.
0.077: tests/versioned/mysql2/promises.tap.js: // promise instrumentation.
0.076: index.js: * then the supportability metrics for custom instrumentation will trigger.
0.075: tests/versioned/common/setup.js: // 2. Create the table and data as test user.
0.074: tests/versioned/common/setup.js: // Travis uses MySQL 5.4 which does not support `IF NOT EXISTS` for
0.074: tests/versioned/common/basic-pool.js: // TODO: test sql capture
0.073: tests/versioned/common/setup.js: // in a database that already has the test user and so we should
0.073: lib/instrumentation.js: // Pull out instance attributes.
0.071: tests/versioned/common/basic-pool.js: // TODO: test variable argument calling
0.071: tests/versioned/common/basic-pool.js: // 2.16 introduced an extra segment
0.071: tests/versioned/common/basic-pool.js: // the data will still be correctly associated with the query.
0.070: README.md:// index.js
0.068: tests/versioned/common/basic-pool.js: // we want to make sure connections are allocated outside any transaction
0.068: tests/versioned/common/basic-pool.js: // but just to be sure they're running there check for the environment flag.
0.067: CHANGELOG.md:* Bumps `tap` to latest major version.
0.066: tests/versioned/common/setup.js: // 1. Create the user and database as root.
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(config) // anonymous group
0.066: tests/versioned/common/basic-pool.js: poolCluster.add(badConfig) // anonymous group
0.066: lib/instrumentation.js: // query({opts|sql}, callback)
0.065: tests/versioned/common/basic-pool.js: // umm... so this test is pretty hacky, but i want to make sure we don't
0.065: CHANGELOG.md:* Fixed instrumentation of `mysql2/promise`.
0.063: lib/instrumentation.js: // Then determine the query values and callback parameters.
0.062: index.js: * for some reason choose to explicitly use an older version of our instrumentation
0.062: CHANGELOG.md:* Bumps `newrelic` dependency minimum to `5.9.1` which includes critical fix for this module to load for `mysql2/promise`.
0.061: tests/versioned/common/setup.js: // `CREATE USER`. This means we will likely be creating the test user
0.060: lib/instrumentation.js: // simplify the wrapping of its callback in future calls.
0.059: tests/versioned/common/pooling.js: // in the callback (which is its own segment) would mark it as truncated
0.058: tests/versioned/common/basic-pool.js: // TODO: test .query without callback
0.058: CHANGELOG.md:* Initial release of `mysql` and `mysql2` instrumentation as a separate module.
0.056: lib/instrumentation.js: // query(sql [, values], callback)
0.056: lib/instrumentation.js: // query(opts [, values], callback)
0.054: tests/versioned/common/pooling.js: // need to inspect on next tick, otherwise calling transaction.end() here
0.052: tests/versioned/common/basic-pool.js: // to connect to, which only happens if there is a MySQL instance running on
0.050: lib/instrumentation.js: // query({opts|sql}, values, callback) - values can be undefined
0.049: lib/instrumentation.js: // Leave getConnection wrapped in order to maintain TX state, but we can
0.048: tests/versioned/mysql2/promises.tap.js: // certain potential error cases with module resolution.
0.044: lib/instrumentation.js: // Figure out the query parameter.
0.042: tests/versioned/common/transactions.js: // trying the object mode of client.query
0.042: tests/versioned/common/basic-pool.js: // TODO: test error conditions
0.037: CHANGELOG.md:* Bumps minimum required `newrelic` version to `6.0.0` for Node 12 compatible fixes.
0.033: index.js: * Allows users to `require('@newrelic/mysql')` directly in their app. If they
0.026: lib/instrumentation.js: // In the unix domain socket case we force the host to be localhost
0.025: CHANGELOG.md:* Fixes bug with `mysql2/promise` where underlying callback instrumentation would look at the wrong query arg for the callback.
0.024: CHANGELOG.md:* Reorganizes promises test to expose bug that is fixed in agent version `5.9.1`.
Contents of profanity.py
:
#!/usr/bin/env python
import sys
from profanity_check import predict, predict_prob
for line in sys.stdin:
line = line.strip()
predict = predict_prob([line])[0]
output = '{0:.3f}:\t{1}'.format(predict, line)
print(output)
Installing the dependencies:
pip install profanity-check
pip install scikit-learn=0.22
brew install ripgrep
It looks like "Enforces" may be a strong word, making that line the second most offensive. For the number one spot, I'm guessing "mysql" triggered the checker for being offensive.
But, nothing that needs cleaning. ๐ ๐งน
from node-newrelic-mysql.
Related Issues (20)
- Update issue templates to current standards
- Ensure PR template up to expectations/standard
- Add standard code of conduct
- Add copyright to all source files
- Switch to 'main' as default branch
- Make Third Party Notices updateable via standard CLI tool
- Update contributing guidelines
- Update license to Apache 2.0
- Update Readme HOT 2
- Convert CI to GitHub Actions
- Add repo to opensource.newrelic.com HOT 1
- mysql2 promise support HOT 9
- Add Node 14 support / Drop Node 8
- Update tap to version 15
- Automate third-party notice updates
- 'execute' is not supported in this standalone mysql module HOT 1
- Unable to install Mysql , Nginx , Java agent in our aws cloud environment HOT 3
- @newrelic/mysql: Update README to mark this package as EOLd HOT 1
- mysql: add node 20 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-newrelic-mysql.