Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including analise-advpl with all npm packages installed. Try it out:

var analiseAdvpl = require("analise-advpl")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

analise-advpl v5.0.11

Extension of ADVPL code analysis.

analise-advpl

Criação de modulo para validação de fontes ADVPL.

Install

npm install analise-advpl --save

Test

npm run test

Example usage in global scope

const fileSystem = require('file-system');
let validaAdvpl = require('analise-advpl');
let conteudo = fileSystem.readFileSync('c:\\arquivo.prw', 'latin1');

//o primeiro parâmetro é o padrão de comentários e o segundo a localização de mensagens
let objeto = new validaAdvpl.ValidaAdvpl([], 'ptb');
//define o nome do banco de dados ou owner
objeto.ownerDb = ['PROTHEUS'];
//define os códigos de empresas que irá validar na queryes
objeto.empresas = ['01'];
//efetua a validação do fonte
objeto.validacao(conteudo, 'COM ERRO');
let validaProjeto = require('../lib/validaProjeto');
let objeto = new validaProjeto.validaProjeto([]);

let comentario = [
  '/*//#########################################################################################',
  'Projeto\\ \\:',
  'Modulo\\ \\ \\:',
  'Fonte\\ \\ \\ \\:',
  'Objetivo\\:'
];

//seta variáveis
objeto.ownerDb = ['PROTHEUS'];
objeto.empresas = ['01'];
objeto.comentFontPad = comentario;

objeto.validaProjeto([
  'D:\\rogerio\\Dropbox\\Trabalho\\WORKSPACE\\POUPEX\\ADVPL\\protheus'
]);

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free