Skip to content

Commit

Permalink
Add phpspy coloring #201
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianKurylak committed May 22, 2021
1 parent 99d76c2 commit 140c366
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions webapp/javascript/util/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ export class ObjectsFormatter {
export function getPackageNameFromStackTrace(spyName, stackTrace) {
// TODO: actually make sure these make sense and add tests
const regexpLookup = {
default: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
dotnetspy: /^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/,
ebpfspy: /^(?<packageName>.+)$/,
gospy: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
phpspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/,
pyspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/,
rbspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/,
gospy: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
ebpfspy: /^(?<packageName>.+)$/,
dotnetspy: /^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/,
default: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
};

if (stackTrace.length === 0) {
Expand Down

0 comments on commit 140c366

Please sign in to comment.