extern "C"
{
#include "Scierror.h"
+#include "sciprint.h"
#include "localization.h"
}
+static bool contributionMsg = true;
/**
* slint(String[a,b] files, String[1,c] conf, String[1,1] out)
* slint(String[a,b] files, String[1,1] out) : default conf is etc/slint.xml
delete results;
+ if (contributionMsg)
+ {
+ sciprint("%s\n", _("Module developed with the contribution of CNES."));
+ contributionMsg = false;
+ }
+
return types::Function::OK;
}
else
{
(*out) << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
- << "<SLintResult>\n";
+ << "<SLintResult>\n";
}
}
void SLintXmlResult::finalize()
{
+ if (current.get())
+ {
+ (*out) << " </File>\n";
+ }
+
(*out) << "</SLintResult>\n";
out->close();
delete out;
return scilab::UTF8::toUTF8(replaceByEntities(str));
}
- void SLintXmlResult::handleMessage(SLintContext & context, const Location & loc, const SLintChecker & checker, const unsigned sub, const std::wstring & msg)
+void SLintXmlResult::handleMessage(SLintContext & context, const Location & loc, const SLintChecker & checker, const unsigned sub, const std::wstring & msg)
{
if (context.getSciFile().get() != current.get())
{
void SLintXmlResult::print(const Location & loc)
{
(*out) << " <Location first_line=\"" << loc.first_line
- << "\" first_column=\"" << loc.first_column
- << "\" last_line=\"" << loc.last_line
- << "\" last_column=\"" << loc.last_column
- << "\"/>\n";
+ << "\" first_column=\"" << loc.first_column
+ << "\" last_line=\"" << loc.last_line
+ << "\" last_column=\"" << loc.last_column
+ << "\"/>\n";
}
- void SLintXmlResult::print(const SLintChecker & checker, const unsigned sub)
+void SLintXmlResult::print(const SLintChecker & checker, const unsigned sub)
{
(*out) << " <Checker name=\"" << checker.getName()
- << "\" id=\"" << getStr(checker.getId(sub))
- << "\"/>\n";
+ << "\" id=\"" << getStr(checker.getId(sub))
+ << "\"/>\n";
}
void SLintXmlResult::print(const std::wstring & msg)
{
(*out) << " <Message text=\"" << getStr(msg)
- << "\"/>\n";
+ << "\"/>\n";
}
std::wstring SLintXmlResult::replaceByEntities(const std::wstring & seq)